Skip to content

Commit cc91141

Browse files
Merge pull request hestiacp#792 from tjebbeke/patch-7
Improve email validation
2 parents 2f967e4 + cd2eed6 commit cc91141

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

func/main.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ is_dns_record_format_valid() {
613613

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

0 commit comments

Comments
 (0)