I’m creating a program with materialize and using the data format dd/mm/ yyyy and for that, i change the validate in table model to -> data (‘data_val’, [‘dmy’]) as seen below, but when i save, for tests, the patchEntity method doesn’t return an error, but leaves the data_val field in ge_lote as null, as you can see in imagem below
the object result from patchEntity object
validator for data_val
$validator
->date('data_val', ['dmy'])
->requirePresence('data_val', 'create')
->notEmptyDate('data_val');
My date field in template
echo '<div class="input-field">';
echo '<i class="material-icons prefix">date_range</i>';
echo $this->Form->text('data_val', array("id" =>"data", "class" => "datepicker"));
echo '<label for="data">';echo $this->Form->label("data", "Data de validade");echo '</label>';
echo '</div>';
the view with datepicker view