src/ValidateCapableTrait.php
protected function _validate($subject)
    {
        $errors = $this->_getValidationErrors($subject);

        if (!$this->_countIterable($errors)) {
            return;
        }

        throw $this->_throwValidationFailedException($this->__('Validation failed'), null, null, true, $subject, $errors);
    }
protected function _validate($subject)
    {
        $errors = $this->_getValidationErrors($subject);

        if (!$this->_countIterable($errors)) {
            return;
        }

        throw $this->_throwValidationFailedException($this->__('Validation failed'), null, null, true, $subject, $errors);
    }
protected function _validate ( $ subject ) { $ errors = $ this -> _getValidationErrors ( $ subject ) ; if ( ! $ this -> _countIterable ( $ errors ) ) { return ; } throw $ this -> _throwValidationFailedException ( $ this -> __ ( 'Validation failed' ) , null , null , true , $ subject , $ errors ) ; }
Validates a subject.

@since [*next-version*]

@param mixed $subject The value to validate.

@throws ValidationFailedExceptionInterface If subject is invalid.
@throws RootException                      If problem validating.
Validates a subject .