IT/Flutter

[Flutter] RegExp for Email.

로바아토 2018. 7. 6. 15:03

r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)"


if (!RegExp(r'(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)')
.hasMatch(value)) {
return 'Email should be mail format.';
}