apps/password_policy/lib/PasswordValidator.php
/**
	 * check if password contain at least one numeric character
	 *
	 * @param string $password
	 * @throws HintException
	 */
check if password contain at least one numeric character
@param string $password
@throws HintException
check if password contain at least one numeric character @param string $password @throws HintException
protected function checkNumericCharacters($password) {
		$enforceNumericCharacters = $this->config->getEnforceNumericCharacters();
		if($enforceNumericCharacters) {
			if (preg_match('/^(?=.*\d).+$/', $password) !== 1) {
				$message = 'Password need to contain at least one numeric character';
				$message_t = $this->l->t(
					'Password need to contain at least one numeric character.'
				);
				throw new HintException($message, $message_t);
			}
		}
	}
protected function checkNumericCharacters ( $ password ) { $ enforceNumericCharacters = $ this -> config -> getEnforceNumericCharacters ( ) ; if ( $ enforceNumericCharacters ) { if ( preg_match ( '/^(?=.*\d).+$/' , $ password ) !== 1 ) { $ message = 'Password need to contain at least one numeric character' ; $ message_t = $ this -> l -> t ( 'Password need to contain at least one numeric character.' ) ; throw new HintException ( $ message , $ message_t ) ; } } }
check if password contain at least one numeric character
 @param string $password
 @throws HintException
check if password contain at least one numeric character @param string $password @throws HintException