vaadin / flow

Vaadin Flow is a Java framework binding Vaadin web components to Java. This is part of Vaadin 10+.
Apache License 2.0
606 stars 166 forks source link

EmailValidator allows some invalid email addresses #18887

Open Foobartender opened 6 months ago

Foobartender commented 6 months ago

Description of the bug

Please see vaadin/web-components#7174. com.vaadin.flow.data.validator.EmailValidator has the same issue.

I noticed this, because my backend (not Java) disagreed with the email field on the validity of an email address and returned 400 Bad Request. I'd suggest to keep UI validation congruent with common backend validation, most notably Hibernate Validator. At least, it shouldn't allow anything that will be rejected later.

By the way, this fix has not been replicated here.

web-padawan commented 6 months ago

Note, here is the web component PR that is going to address this: https://github.com/vaadin/web-components/pull/7179

mshabarov commented 6 months ago

We have to merge/align the regexps from web-component with the mentioned fix and the Flow's EmailValidator regexp.