Merge pull request #792 from tjebbeke/patch-7

Improve email validation
This commit is contained in:
Serghey Rodin 2016-08-30 00:12:21 +03:00 committed by GitHub
commit cc91141f8d

View file

@ -613,7 +613,7 @@ is_dns_record_format_valid() {
# Email format validator
is_email_format_valid() {
if [[ ! "$1" =~ "@" ]] ; then
if [[ ! "$1" =~ ^[A-Za-z0-9._%+-]+@[[:alnum:].-]+\.[A-Za-z]{2,63}$ ]] ; then
check_result $E_INVALID "invalid email format :: $1"
fi
}