خرید بک لینک

Vote count: 0

I am trying to validate the email address using a regular expression such that it throws an error if white spaces are added anywhere in the email. The current regex I am using is this:

<input type="email" class="form-control" name="useame" ng-     model="useame" id="email" placeholder="Email" ng-patte='/^(([^<>()    []\.,;:s@"]+(.[^<>()[]\.,;:s@"]+)*)|(".+"))@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}])|(([a-zA-Z-0-9]+.)+[a-zA-Z]{2,}))$/' required />
<span ng-show="login.useame.$error.patte">This email format is invalid!     </span>

The problem is it allows me to add white spaces in the end. How can I modify it so that if I add a whitespace in the end the error message is fired?

asked 19 secs ago

برچسب: نویسنده: استخدام کار تاريخ: چهارشنبه 9 تير 1395 ساعت: 17:21

صفحه بندی