Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.x] Put length parameter for translation #70

Merged
merged 1 commit into from Sep 21, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Rules/Password.php
Expand Up @@ -67,13 +67,13 @@ public function message()
}

if ($this->requireUppercase && ! $this->requireNumeric) {
return __('The :attribute must be at least '.$this->length.' characters and contain at least one uppercase character.');
return __('The :attribute must be at least :length characters and contain at least one uppercase character.', ['length' => $this->length]);
} elseif ($this->requireNumeric && ! $this->requireUppercase) {
return __('The :attribute must be at least '.$this->length.' characters and contain at least one number.');
return __('The :attribute must be at least :length characters and contain at least one number.', ['length' => $this->length]);
} elseif ($this->requireUppercase && $this->requireNumeric) {
return __('The :attribute must be at least '.$this->length.' characters and contain at least one uppercase character and number.');
return __('The :attribute must be at least :length characters and contain at least one uppercase character and number.', ['length' => $this->length]);
} else {
return __('The :attribute must be at least '.$this->length.' characters.');
return __('The :attribute must be at least :length characters.', ['length' => $this->length]);
}
}

Expand Down