Skip to content
Permalink
Browse files

incorrect value for 'last' in validatio rules

As said in documentation:
"If set to true and the current rule does not validate, the current validation error message is then returned and all following rules for the current field will not be checked."
  • Loading branch information...
MohsenEkhtiari committed Jul 4, 2014
1 parent 3674d70 commit 7eed83cbdf90564eefa7ed84a51ebee77ca09278
Showing with 1 addition and 1 deletion.
  1. +1 −1 cake/console/templates/default/classes/model.ctp
@@ -47,7 +47,7 @@ if (!empty($validate)):
echo "\t\t\t\t//'message' => 'Your custom message here',\n";
echo "\t\t\t\t//'allowEmpty' => false,\n";
echo "\t\t\t\t//'required' => false,\n";
echo "\t\t\t\t//'last' => false, // Stop validation after this rule\n";
echo "\t\t\t\t//'last' => true, // Stop validation after this rule\n";
echo "\t\t\t\t//'on' => 'create', // Limit validation to 'create' or 'update' operations\n";
echo "\t\t\t),\n";
endforeach;

0 comments on commit 7eed83c

Please sign in to comment.
You can’t perform that action at this time.