Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Change validation message language

Felix Daniel
5 years ago Nov 29, 2016 10:10pm
Johannes Häyry
5 years ago Nov 30, 2016 1:18pm

At least DateField has #setDateOutOfRangeMessage and #setParseErrorMessage.

For validators there is usually a msg field in constructor. And if you do a custom Validator you can decide what message is thrown with InvalidValueException. 

Olli Tietäväinen
5 years ago Nov 30, 2016 1:33pm

Note that you can also override many of the protected methods in DateField if you want some very specific functionality in your message.

-Olli

Felix Daniel
5 years ago Nov 30, 2016 1:37pm
Felix Daniel
5 years ago Nov 30, 2016 1:41pm

Ok, now it works. I just cleaned up my browser history and it works fine.
Thanks again, both of you!