Class WorkflowValidator
WorkflowValidator run validation for the current workflow event. This validator execute validation for all attributes belonging to the model and being configured for a scenario name that matches the sequence of scenario that is occuring.
For example, the the model is going from status A to status B, this validator - creates a scenario sequence (leave status {A}, from {A} to {B}, enter status {B}) - select attributes configured to be validated of compatibles scenario - run validation for all the previously selected attributes
- yii\validators\Validator
- raoul2000\workflow\validation\WorkflowValidator
Methods summary
public
|
#
validateAttribute( $object, $attribute )
Apply active validators for the current workflow event sequence. |
Properties summary
public
boolean
|
$skipOnEmpty
Overloads the default initialization value because by default, we want to run the validation even if the status attribute is null (which is considered as a 'leaveWorkflow' event). |
#
false
|