Minor editing of validator messages
This commit is contained in:
parent
7d1d8115b2
commit
a6180e05f9
2 changed files with 3 additions and 3 deletions
|
@ -380,8 +380,8 @@ class Validator
|
|||
$error = $this->messages[$field];
|
||||
}
|
||||
if (\is_array($error)) {
|
||||
$type = $error[1];
|
||||
$error = $error[0];
|
||||
$type = $error[0];
|
||||
$error = $error[1];
|
||||
}
|
||||
|
||||
$this->errors[$type][] = \ForkBB\__($error, [':alias' => \ForkBB\__($alias), ':attr' => $attr]);
|
||||
|
|
|
@ -33,7 +33,7 @@ class Register extends Page
|
|||
'password' => 'Passphrase',
|
||||
])->addMessages([
|
||||
'agree.required' => ['cancel', 'cancel'],
|
||||
'agree.token' => [\ForkBB\__('Bad agree', $this->c->Router->link('Register')), 'w'],
|
||||
'agree.token' => ['w', \ForkBB\__('Bad agree', $this->c->Router->link('Register'))],
|
||||
'password.password' => 'Pass format',
|
||||
'username.login' => 'Login format',
|
||||
]);
|
||||
|
|
Loading…
Reference in a new issue