src/Model/UserValidationTrait.php
public function validationPassword(Validator $validator) {
		$validator->setProvider('userTable', $this->_table);

		$validator->add($this->_field('password'), [
			'notBlank' => [
				'rule' => 'notBlank',
				'message' => __d('user_tools', 'A password is required.')
			],
			'minLength' => [
				'rule' => ['minLength', $this->_config['passwordMinLength']],
				'message' => __d('user_tools', 'The password must have at least 6 characters.')
			],
			'confirmPassword' => [
				'rule' => ['compareFields', 'confirm_password'],
				'message' => __d('user_tools', 'The passwords don\'t match!'),
				'provider' => 'userTable',
			]
		]);

		return $validator;
	}
public function validationPassword(Validator $validator) {
		$validator->setProvider('userTable', $this->_table);

		$validator->add($this->_field('password'), [
			'notBlank' => [
				'rule' => 'notBlank',
				'message' => __d('user_tools', 'A password is required.')
			],
			'minLength' => [
				'rule' => ['minLength', $this->_config['passwordMinLength']],
				'message' => __d('user_tools', 'The password must have at least 6 characters.')
			],
			'confirmPassword' => [
				'rule' => ['compareFields', 'confirm_password'],
				'message' => __d('user_tools', 'The passwords don\'t match!'),
				'provider' => 'userTable',
			]
		]);

		return $validator;
	}
public function validationPassword ( Validator $ validator ) { $ validator -> setProvider ( 'userTable' , $ this -> _table ) ; $ validator -> add ( $ this -> _field ( 'password' ) , [ 'notBlank' => [ 'rule' => 'notBlank' , 'message' => __d ( 'user_tools' , 'A password is required.' ) ] , 'minLength' => [ 'rule' => [ 'minLength' , $ this -> _config [ 'passwordMinLength' ] ] , 'message' => __d ( 'user_tools' , 'The password must have at least 6 characters.' ) ] , 'confirmPassword' => [ 'rule' => [ 'compareFields' , 'confirm_password' ] , 'message' => __d ( 'user_tools' , 'The passwords don\'t match!' ) , 'provider' => 'userTable' , ] ] ) ; return $ validator ; }
Validates the password field.

Override it as needed to change the rules for only that field.

@param \Cake\Validation\Validator $validator Validator
@return \Cake\Validation\Validator
Validates the password field .