How to validalidate multiple fields in unique validator?
I read that in the old version it was:
$this->validate(new Uniqueness(array( 'field' => array('email', 'name') )));
But now Model validators are deprecated, i try the following but it doesn't work.
$validator->add('field_unique_per_user_id', new Uniqueness([ 'model' => $this, "message" => 'You already have this field.', "fields" => ["user_id", "field_unique_per_user_id"], ]) );