Form block HTML5 validation
Permalink
Hello,
I made a form using the core form block. I inserted a field of type "email address", as usual. Thing is, the HTML5 validation gives the error message on the system language. As I'm building a multilanguage site, this is not ideal.
I can't find the error message anywhere on the code, so I can't customize it and make it change according to the selected language on the internationalization add-on.
I would like to have some sort of validation on the email field but don't feel like building an external form for this very simple use case (only 3 fields). If someone could tell me how I can change the HTML5 message or provides some code to validate emails on the form controller I'd be most grateful.
Thanks!
I made a form using the core form block. I inserted a field of type "email address", as usual. Thing is, the HTML5 validation gives the error message on the system language. As I'm building a multilanguage site, this is not ideal.
I can't find the error message anywhere on the code, so I can't customize it and make it change according to the selected language on the internationalization add-on.
I would like to have some sort of validation on the email field but don't feel like building an external form for this very simple use case (only 3 fields). If someone could tell me how I can change the HTML5 message or provides some code to validate emails on the form controller I'd be most grateful.
Thanks!