For email validation you should use- 'email'=> array( 'mustNotEmpty'=>array( 'rule' => 'notEmpty', 'message'=> __('Please enter email'), 'last'=>true), 'mustBeEmail'=> array( 'rule' => array('email'), 'message' => __('Please enter valid email'), 'last'=>true) ),
and for deep checking 'email'=> array( 'mustNotEmpty'=>array( 'rule' => 'notEmpty', 'message'=> __('Please enter email'), 'last'=>true), 'mustBeEmail'=> array( 'rule' => array('email', true), 'message' => __('Please enter valid email'), 'last'=>true) ), On Fri, Nov 2, 2012 at 7:05 PM, Chris <chris...@yahoo.com> wrote: > hi guys,... I'm getting this preg_match Warning on Email issue no matter > what I do,.... > can anyone help me please,.... > > Warning (2): preg_match() [function.preg-match]: Delimiter must not be > alphanumeric or backslash [APP/controllers/invitations_controller.php, line > 83] > > and this is what I have in a Model: > > var $validate = array( > 'email' => array( > 'rule' => 'alphaNumeric', > 'required' => true, > 'allowEmpty' => false, > ), > ); > > thanks in advance,... > chris > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > 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+unsubscr...@googlegroups.com. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > > > -- Chetan Varshney Ektanjali Softwares Pvt Ltd -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.