You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bacause is_required gets FALSE instead of 0 which I assigned to fco_is_active.
For quick fix we could make new rule like 'valid_boolean', use it at one of the first rules and change $value inside of processRules to false -> 0, true -> 1 for other validation rules like required or in_list[0,1]
What do you think? Is it a bug o proper behavior ?
Or is any way to get casts of saved entity in Rules class methods without passing every cast through Model::save() , Validation::run() and Validation::processRules() ?
The text was updated successfully, but these errors were encountered:
As we know we've got casting in entity class which could cast boolean values to integer (for database) and integers 0,1 to false, true from db.
And I am wondering how to fix that case:
My entity class:
and model:
and now from other model I am doing sth like this:
and I've got error:
bacause is_required gets FALSE instead of 0 which I assigned to fco_is_active.
For quick fix we could make new rule like 'valid_boolean', use it at one of the first rules and change $value inside of processRules to false -> 0, true -> 1 for other validation rules like required or in_list[0,1]
What do you think? Is it a bug o proper behavior ?
Or is any way to get casts of saved entity in Rules class methods without passing every cast through Model::save() , Validation::run() and Validation::processRules() ?
The text was updated successfully, but these errors were encountered: