[MGNLFORM-251] Make email validation more robust Created: 25/Nov/14 Updated: 15/Dec/14 Resolved: 04/Dec/14 |
|
| Status: | Closed |
| Project: | Magnolia Form Module |
| Component/s: | field, validation |
| Affects Version/s: | 2.2.8 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Richard Gange | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 1 |
| Labels: | support | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Description |
|
The reg exp used by the form module for email validation is: (^$|^\S+@\S+$) This could be improved. Something like: [-0-9a-zA-Z.+_]+@[-0-9a-zA-Z.+_]+\.[a-zA-Z]{2,4}
Source: http://blog.trojanhunter.com/2012/09/26/the-best-regex-to-validate-an-email-address/ Or the same expression used in our ui form module: ^([a-zA-Z0-9_\\.\\-+])+@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]{2,4})+$
Found in: com.vaadin.data.validator.EmailValidator |