I have just started using cakePHP 2.1. After submiting a form. If there is a validation error how to check the params whether there is an error ?
Before we used to do something like
$this->data['params'];
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For example if you are saving the data in Form submit and you have validations defined on that Model, the data will be saved only when the call to
Model->save()returns true. In that case most probably you have validations error. The way you can specifically check is to check Model’s validationErrors proprty.In your controller