I'm using cakephp validation for a field called birthdate.
my model is
'birthdate' => array(
'rule' => 'date',
'message' => 'Enter a valid date',
'allowEmpty' => true
),
my question is how come it's still save correctly even though it's invalid input. e.g:
March 27, 1988 so, if I put it like this, and the array result like this
//this will work
'birthdate' => array(
'month' => '3#',
'day' => '27',
'year' => '1988'
)
//this will NOT work
'birthdate' => array(
'month' => '#3',
'day' => '27',
'year' => '1988'
)
why the first one still validate it (still save correctly. e.g: the end result still march 27, 1988)? but I would like to have consistency. is there anyway to report an error?