I'm asking how can I use it in multiple validation per field case:
example:
var $validate = array
(
'id' => array(
'idRule-1' => array(
'rule' => 'isUnique',
'message' => 'id is already registered.'
),
'idRule-1' => array(
'rule' => '/^[a-z0-9]{3}-([a-z0-9]{5}-){3}[a-z0-9]{4}$/',
'message' => 'Id field is not valid.'
),
)
)
How can I explain that ID field is required? where I can write this?
Second question: "allowEmpty => false" is stricter than "required =>
true"? My interpretation about allowEmpty => false is: field will be
required and empty is not allowed. Am I right? If this, I could use
allowEmpty in place of required.
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment