Email validator

前端 未结 4 1946
北荒
北荒 2021-01-22 12:20

Having troubles with my email validation code. I keep on getting the error that my function is not defined. i have made a javascript file for the java code and then i used the o

4条回答
  •  心在旅途
    2021-01-22 13:02

    If you are specific about the domains , you may use this code for email validation so as to prevent anonymous email domains.

    (^([a-zA-Z]{1,20}[-_.]{0,1}[a-zA-Z0-9]{1,20})(\@gmail\.com|\@yahoo\.com|\@hotmail\.com)$)
    

    You may add additional domains too.

提交回复
热议问题