Sorry, I found the solution myself, but I post it here just in case someone finds it helpfull.
I was adding the “data-request-flash” to the form. Just by removing it, the flash message is not shown, but the proper errors do.
but i think there is still a problem, after a successfull form submission, I would have liked to show a flash success message and by removing data-request-flash, it wont work.
Oh, I see your point. I hadn’t spotted that cause in my forms I use to redirect to a thank you page after succesfull submission. I don’t know if there’s a way then to throw the exception without flash message.
@daft is there a way to do this? I’d like to handle the errors with NO flash, just using the <span data-validate-for="..."></span> but still do show a flash message on success. Example, a newsletter subscription form, where a redirection would be overkill.
There is a potential solution for this coming in v3.2… The data-request-flash attribute has been improved so you can specify which messages to display. For example, to only show success and warning flash messages: