33 public function addUserInfoRules(\
Magento\Framework\
Validator\DataObject $validator)
36 $userNameNotEmpty->setMessage(
37 __(
'"User Name" is required. Enter and try again.'),
41 $firstNameNotEmpty->setMessage(
42 __(
'"First Name" is required. Enter and try again.'),
46 $lastNameNotEmpty->setMessage(
47 __(
'"Last Name" is required. Enter and try again.'),
51 $emailValidity->setMessage(
52 __(
'Please enter a valid email.'),
85 $passwordLength =
new StringLength([
'min' => $minPassLength,
'encoding' =>
'UTF-8']);
86 $passwordLength->setMessage(
87 __(
'Your password must be at least %1 characters.', $minPassLength),
90 $passwordChars =
new Regex(
'/[a-z].*\d|\d.*[a-z]/iu');
91 $passwordChars->setMessage(
92 __(
'Your password must include both numeric and alphabetic characters.'),
118 $passwordConfirmation
120 $passwordConfirmation = new \Zend_Validate_Identical($passwordConfirmation);
121 $passwordConfirmation->setMessage(
122 __(
'Your password confirmation must match your password.'),
125 $validator->addRule($passwordConfirmation,
'password');
addPasswordConfirmationRule(\Magento\Framework\Validator\DataObject $validator, $passwordConfirmation)
const MIN_PASSWORD_LENGTH
addPasswordRules(\Magento\Framework\Validator\DataObject $validator)