Jose_Antonio11
(José Antonio Delgado Trujillo)
December 2, 2017, 9:00pm
1
I don’t know what does it happen here with the regular expression.
I have tested in several online regular expression tools.
binder.forField(pass)
.withvalidator(new RegexpValidator("At least one capital letter", "\\w*[A-Z]
\\w*" )
.bind(Person::getPass, Person::setPass);
mcollovati
(Marco Collovati)
December 2, 2017, 9:14pm
2
Hi,
what is the problem you’re experiencing?
I tried your code and it seems to work on Vaadin 8.1.7
Jose_Antonio11
(José Antonio Delgado Trujillo)
December 2, 2017, 10:05pm
3
When i put a cappital letter in the field pass, it is still the error indicator ! and the message.
It is a little bizarre beacause it works with at least a digit with the regex (“\w*\d\w*”)
Jose_Antonio11
(José Antonio Delgado Trujillo)
December 5, 2017, 7:40pm
4
Upps
it didn’t work because i had wrote [A_Z]
instead of [A-Z]
. I was going crazy, sorry