Angular JS Email Validation with unicode characters

后端 未结 5 751
日久生厌
日久生厌 2021-01-05 08:45

I have a sign up form for an application, and angular js is responsible for its validation.

I ran into an issue when Angular js wasn\'t accepting an email address wh

5条回答
  •  温柔的废话
    2021-01-05 09:30

    If having html5 is not critical, you can use and pattern validation

     
    

    and you can use regex that @Andy Joslin posted in his answer

     $scope.EMAIL_REGEXP = /^[a-z0-9!#$%&'*+/=?^_`{|}~.-]+@[a-z0-9-]+(\.[a-z0-9-]+)*$/i;
    

提交回复
热议问题