beforeValidate()
beforeValidate(\Model $model, array $options = array()) : mixed
beforeValidate is called before a model is validated, you can use this callback to add behavior validation rules into a models validate array. Returning false will allow you to make the validation fail.
Parameters
\Model | $model | Model using this behavior |
array | $options | Options passed from Model::save(). |
Returns
mixed —False or null will abort the operation. Any other result will continue.