The validation keeps going for each field until it reaches the end or fails on a rule that has 'last' => true in it and returns the last found error message; so add that to each rule and you'll be OK (I do that by default for every rule).
Jeremy Burns Class Outfit http://www.classoutfit.com On 6 Sep 2012, at 11:06:19, Sheikh Razu <[email protected]> wrote: > public $validate = array( > > 'username' => array( > > 'unique' => array( > > 'rule' => array('isUnique'), > > 'message' => 'Brugernavnet er allerade taken', > > 'allowEmpty' => false, > > 'required' => true, > > ), > > 'email' => array( > > 'rule' => array('email'), > > 'message' => "De følgende resultater er fundet ", > > 'allowEmpty' => false, > > 'required' => true, > > ), > > ), > > ); > > This is a danish website. My validation array is as above. For the second > rule ('email') for username, validation message is coming on the page if the > username is not valid email. I guess its because of special danish character > inside the message string. How can I solve this problem. Please help. > > > -- > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > Visit this group at http://groups.google.com/group/cake-php?hl=en-US. > > -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
