apps/password_policy/lib/PasswordValidator.php
/**
	 * check if password contain at least one upper and one lower case character
	 *
	 * @param string $password
	 * @throws HintException
	 */
check if password contain at least one upper and one lower case character
@param string $password
@throws HintException
check if password contain at least one upper and one lower case character @param string $password @throws HintException
protected function checkUpperLowerCase($password) {
		$enforceUpperLowerCase = $this->config->getEnforceUpperLowerCase();
		if($enforceUpperLowerCase) {
			if (preg_match('/^(?=.*[a-z])(?=.*[A-Z]).+$/', $password) !== 1) {
				$message = 'Password need to contain at least one lower case character and one upper case character.';
				$message_t = $this->l->t(
					'Password need to contain at least one lower case character and one upper case character.'
				);
				throw new HintException($message, $message_t);
			}
		}
	}
protected function checkUpperLowerCase ( $ password ) { $ enforceUpperLowerCase = $ this -> config -> getEnforceUpperLowerCase ( ) ; if ( $ enforceUpperLowerCase ) { if ( preg_match ( '/^(?=.*[a-z])(?=.*[A-Z]).+$/' , $ password ) !== 1 ) { $ message = 'Password need to contain at least one lower case character and one upper case character.' ; $ message_t = $ this -> l -> t ( 'Password need to contain at least one lower case character and one upper case character.' ) ; throw new HintException ( $ message , $ message_t ) ; } } }
check if password contain at least one upper and one lower case character
 @param string $password
 @throws HintException
check if password contain at least one upper and one lower case character @param string $password @throws HintException