I have a form with dynamic fields (multiple users added dynamicly with one form)
I'm trying to add an error message to a specific field after a manual validation (with a basic if)
I've tried the following and none of this work
$validator->errors()->add('password.0', 'Les mots de passe ne correspondent pas');
$validator->errors()->add('password.*', 'Les mots de passe ne correspondent pas');
$validator->errors()->add('password[0]', 'Les mots de passe ne correspondent pas');
I can't make the message bag accepting my message and at the end, "$validator->errors()" doesn't contain the message for my field password[0]
Does anybody knows how to make it work?