Date validation

Since last update, validateUnique is failing on table date field.
In function validationDefault of the table I have:
$validator
->date(‘data’)
->notEmpty( ‘data’ )
->add( ‘data’, ‘unique’, [‘rule’ => ‘validateUnique’, ‘provider’ => ‘table’, ‘message’ => ‘$validator says is not unique’ ] );

validateUnique is returning false on line 2298 in ORM/Table.php ( $field is object(Cake\I18n\Date) , not scalar ).

Is there another way to check for Unique on a date field?
Thank you.

You should post this as a github issue

The other way of checking a date field is by Application rules
Ex:

try {
if ( $id = $this->table->save( $record ) )
{ …“all good” }
else
{echo ‘FAILED on save. Application validation:’ . $record->errors()[‘data’][‘uniqueData’];}
} catch (\Exception $e) { //if you forget to add $rules->add… in function buildRules
echo ’ MYSQL error:’ . $e->getMessage();
}