Minor editing of validator messages

This commit is contained in:
Visman 2019-12-28 15:19:27 +07:00
parent 7d1d8115b2
commit a6180e05f9
2 changed files with 3 additions and 3 deletions

View file

@ -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]);

View file

@ -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',
]);