Cool, thanks teknoid.
I was simply going through a tutorial in the Apress book Beginning
CakePHP. . . maybe an errata in the book.
Anyways, thanks.
On Sep 23, 2:33 pm, teknoid [EMAIL PROTECTED] wrote:
You've not specified a 'rule' for 'content'. ('required' is not a
rule, really).
could be:
'content'=array(
'rule='notEmpty',
'required'=true
)
Double check in the manual to see what 'required' means
On Sep 23, 1:33 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
Hi awesome Cake developers,
Having a problem with validate in 1.2.
Something in the last portion of this $validate definition is kicking
out an error:
var $validate = array(
'name' = array(
'alphaNumeric'=array(
'rule'='alphaNumeric',
'required'=true,
'message'='The Title may not contain any
symbols'
),
'maxLength'=array(
'rule'=array('maxlength',80),
'message'='The Title may not exceed 80
characters'
)
),
'date' = array(
'date'=array(
'rule'='date',
'required'=true,
'message'='You must provide a valid date'
)
),
'content' = array(
'required' = true
)
);
The error is:
Warning (2): preg_match() [function.preg-match]: Delimiter must not be
alphanumeric or backslash [CORE/cake/libs/model/model.php, line 2269]
However, if I add another rule (i.e. alphaNumeric) to the content, no
error.
Any ideas?
Thank you.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---