I’m using the sfGuardDoctrine plugin, and I would like to customize the form validation messages.
How could I acomplish this? I can’t find anything in the documentation.
The only way I have found is to copy sfGuardValidatorUser.class into /apps/frontend/lib/validator, but I would like to know if there is some way to just override the error message, not override the entire validator…
I have found a post about external authentication. There the author creates a custom form that inherits from the original plugin form.
I think it is a clean way to customize everything, including error messages.
Link: http://blog.honnecke.us/2010/01/using-sfdoctrineguardusers-external-authentication/
Basically, we have to add in app.yml the name of our custom form:
Then we create the form into the lib/form directory of our app folder:
Done!