dart-validate
dart-validate copied to clipboard
Email validation regex incomplete
The regex for validate email here
https://github.com/MikeMitterer/dart-validate/blob/4af87cb6c1892421eab1ce27cdfe4c872ddb6ef0/lib/validate.dart#L57
correctly validate the address [email protected] but fails with [email protected] which is a valid address either.
I have realised in my app already released that it fails for [email protected] too.
I'm using version 1.7.0.
I'm using a self made validation based on following pattern. Sorry: I cannot submit a PR at the moment.
static const String PATTERN_EMAIL =
r'^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$';