public function validateAttribute($object, $attribute)
	{
		if (  ! SimpleWorkflowBehavior::isAttachedTo($object) ) {
			throw new WorkflowException('Validation error : the model does not have the SimpleWorkflowBehavior');
		}

		try {
			$scenarioList= $object->getScenarioSequence($object->$attribute);
		} catch (WorkflowException $e) {
			$object->addError($attribute, 'Workflow validation failed : '.$e->getMessage());
			$scenarioList = [];
		}

		if ( count($scenarioList) != 0 ) {
			foreach ($object->getValidators() as $validator) {
				foreach ($scenarioList as $scenario) {
					if ($this->_isActiveValidator($validator, $scenario)) {
						$validator->validateAttributes($object);
					}
				}
			}
		}
	}
public function validateAttribute($object, $attribute)
	{
		if (  ! SimpleWorkflowBehavior::isAttachedTo($object) ) {
			throw new WorkflowException('Validation error : the model does not have the SimpleWorkflowBehavior');
		}

		try {
			$scenarioList= $object->getScenarioSequence($object->$attribute);
		} catch (WorkflowException $e) {
			$object->addError($attribute, 'Workflow validation failed : '.$e->getMessage());
			$scenarioList = [];
		}

		if ( count($scenarioList) != 0 ) {
			foreach ($object->getValidators() as $validator) {
				foreach ($scenarioList as $scenario) {
					if ($this->_isActiveValidator($validator, $scenario)) {
						$validator->validateAttributes($object);
					}
				}
			}
		}
	}
public function validateAttribute ( $ object , $ attribute ) { if ( ! SimpleWorkflowBehavior :: isAttachedTo ( $ object ) ) { throw new WorkflowException ( 'Validation error : the model does not have the SimpleWorkflowBehavior' ) ; } try { $ scenarioList = $ object -> getScenarioSequence ( $ object -> $ attribute ) ; } catch ( WorkflowException $ e ) { $ object -> addError ( $ attribute , 'Workflow validation failed : ' . $ e -> getMessage ( ) ) ; $ scenarioList = [ ] ; } if ( count ( $ scenarioList ) != 0 ) { foreach ( $ object -> getValidators ( ) as $ validator ) { foreach ( $ scenarioList as $ scenario ) { if ( $ this -> _isActiveValidator ( $ validator , $ scenario ) ) { $ validator -> validateAttributes ( $ object ) ; } } } } }
Apply active validators for the current workflow event sequence.

If a workflow event sequence is about to occur, this method scan all validators defined in the
owner model, and applies the ones which are compatibles for the upcomming events.

@see \raoul2000\workflow\events\IEventSequence
Apply active validators for the current workflow event sequence .