clarkwinkelmann With the current code for validation, i need a check to be sure that any error related to my field are showed after the Flarum one.
I tried to merge a new rule like this:
if ($event->type instanceof \Flarum\User\UserValidator) {
$event->validator->addRules([
'confirmPassword' => [
'required',
'min:8'
]
]);
}
The error appear, but if i type in the field the error required
is always there.
Then i tried to add a confirmed
rule to password
:
if ($event->type instanceof \Flarum\User\UserValidator) {
$event->validator->addRules([
'password' => [
'confirmed',
],
'confirmPassword' => [
'required',
'min:8'
]
]);
}
and renamed the input confirmPassword
attribute name to password_confirmation
and i get the error passwords does not match
(if i remember right) but does not really validate the two inputs.
I also tried to add
$event->validator->validate();
after the rules but nothing changes.