I have a very simple table.
I generated the files with
bin\cake bake all [tableName]
I now have a form where I can add/edit/remove entries.
The problem is that if I put a date that's before 1st January 1600, I get an error saying that the date is invalid.
I assume that the error comes from the validator.
Here are the validation rules :
/**
* Default validation rules.
*
* @param \Cake\Validation\Validator $validator Validator instance.
* @return \Cake\Validation\Validator
*/
public function validationDefault(Validator $validator)
{
$validator
->integer('id')
->allowEmpty('id', 'create');
$validator
->date('debut_date')
->allowEmpty('debut_date');
$validator
->date('fin_date')
->allowEmpty('fin_date');
$validator
->allowEmpty('nom');
$validator
->allowEmpty('description');
return $validator;
}
I don't understand why this error happens. Could you help me please?
Thanks