dart-validate icon indicating copy to clipboard operation
dart-validate copied to clipboard

Email validation regex incomplete

Open mattiagalati opened this issue 6 years ago • 2 comments

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.

mattiagalati avatar Jan 18 '19 15:01 mattiagalati

I have realised in my app already released that it fails for [email protected] too.

I'm using version 1.7.0.

csigueros avatar Jan 29 '19 14:01 csigueros

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,})$';

mattiagalati avatar Feb 05 '19 09:02 mattiagalati