Skip to content

Commit aacaf1b

Browse files
authored
Improve email validation
1 parent e6d6e19 commit aacaf1b

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
@@ -612,7 +612,7 @@ is_dns_record_format_valid() {
612612

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

0 commit comments

Comments
 (0)