Skip to content

Fix weak email validation in Vaadin custom validator example#19263

Open
simpanda01 wants to merge 1 commit into
eugenp:masterfrom
simpanda01:fix/vaadin-email-validation
Open

Fix weak email validation in Vaadin custom validator example#19263
simpanda01 wants to merge 1 commit into
eugenp:masterfrom
simpanda01:fix/vaadin-email-validation

Conversation

@simpanda01

Copy link
Copy Markdown

Fixes #16682

The custom email validator in FormView.java's addCustomValidationExample() only checked email.contains("@"), which incorrectly passes invalid strings like "@" or "abc@" as valid emails.

This PR replaces it with a proper regex-based check, consistent with the phone number validator already used in the same method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug in file vaadin/src/main/java/com/baeldung/introduction/basics/VaadinFlowBasics.java

2 participants