I'm dealing with a little problem that I can't simply get rid of.
I have these validation rules in the required model:
var $validate = array(
'name' => array(
'rule' => 'notEmpty',
'message' => 'Il campo codice non può essere
lasciato vuoto'
),
'customer_name' => array(
'rule' => 'notEmpty',
'message' => 'Il codice cliente non può essere vuoto'
),
'grammatura' => array(
'rule' => array('notEmpty', 'numeric'),
'message' => 'la scheda deve avere una grammatura'
)
);
I probably didn't get the thing right, but if I try to submit the view
with any of these fields empty, it flashes me "Object has been saved
correctly", while it didn't save anything.
What am I doing wrong? Is the setFlash method totally independent from
the error message in the validator?
Thank you
Cristian
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment