Ok, i'll go straight to the point.
AddValidatorRule.class
if ($event->type instanceof \Flarum\User\UserValidator) {
$event->validator->addRules([
'confirmPassword' => [
'required'
]
]);
}
The error The confirm password field is required.
appears. Ok.
Just typing letters in the field, the same error appears. Not ok.
I check the data sent to the /register
route and confirmPassword
is present. Then i decided to add a ValidationException
in my class just to debug
throw new ValidationException([
'confirmPassword' => $event->validator->attributes()['confirmPassword']
]);
but, sadly, a wild Undefined index: confirmPassword
appears.
I also tried the suggestion of @clarkwinkelmann of using the getRules()
/ addRules()
trick, nothing changes.
At this point, i don't know what's going on here.