0
我用模型此查詢來驗證大寫字母驗證在cakephp1.3
'grade' => array(
'ruleName' => array(
'rule' => '/^[A-Z]{1}$/i',
'message'=>'You must enter the code'
// extra keys like on, required, etc. go here...
),
'ruleName2' => array(
'rule'=> 'isUnique',
'on'=> 'create',
'message' => 'This grade is already taken. Please choose a different one.'
),
'ruleName3'=>array(
'rule'=>'notEmpty',
'message'=>'This field is required'
)
),
,但其沒有工作,像如果我給小信,而不是大寫字母,其進入數據庫級。所以請幫我解決這個問題。
在此先感謝