protected function validatePassword($password)
    {
        if (!(new tao_helpers_form_validators_NotEmpty())->evaluate($password)) {
            throw new common_exception_ValidationFailed(GenerisRdf::PROPERTY_USER_PASSWORD, __('Password is empty.'));
        }

        /** @var ValidatorInterface $validator */
        foreach (PasswordConstraintsService::singleton()->getValidators() as $validator) {
            if (!$validator->evaluate($password)) {
                throw new common_exception_ValidationFailed(GenerisRdf::PROPERTY_USER_PASSWORD, $validator->getMessage());
            }
        }
    }
protected function validatePassword($password)
    {
        if (!(new tao_helpers_form_validators_NotEmpty())->evaluate($password)) {
            throw new common_exception_ValidationFailed(GenerisRdf::PROPERTY_USER_PASSWORD, __('Password is empty.'));
        }

        /** @var ValidatorInterface $validator */
        foreach (PasswordConstraintsService::singleton()->getValidators() as $validator) {
            if (!$validator->evaluate($password)) {
                throw new common_exception_ValidationFailed(GenerisRdf::PROPERTY_USER_PASSWORD, $validator->getMessage());
            }
        }
    }
protected function validatePassword ( $ password ) { if ( ! ( new tao_helpers_form_validators_NotEmpty ( ) ) -> evaluate ( $ password ) ) { throw new common_exception_ValidationFailed ( GenerisRdf :: PROPERTY_USER_PASSWORD , __ ( 'Password is empty.' ) ) ; } /** @var ValidatorInterface $validator */ foreach ( PasswordConstraintsService :: singleton ( ) -> getValidators ( ) as $ validator ) { if ( ! $ validator -> evaluate ( $ password ) ) { throw new common_exception_ValidationFailed ( GenerisRdf :: PROPERTY_USER_PASSWORD , $ validator -> getMessage ( ) ) ; } } }
Validate password by evaluate it against PasswordConstraintService and NotEmpty validators

@param $password
@throws common_exception_ValidationFailed If invalid
Validate password by evaluate it against PasswordConstraintService and NotEmpty validators