Angular JS Email Validation with unicode characters

后端 未结 5 732
日久生厌
日久生厌 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:21

    I just updated the regex in the angular.js file (added " ' " in the expression) and it worked, without making any other changes.

    EMAIL_REGEXP = /^[A-Za-z0-9._%+-']+@[A-Za-z0-9.-]+.[A-Za-z]{2,4}$/ . Thanks Vittore, for giving me the idea to update REGEX. :)

提交回复
热议问题