Is there an ng-model and input type email bug?

后端 未结 4 1490
执笔经年
执笔经年 2021-02-07 05:58

Is there something special going on with input type=\"email\" and ng-model attribute? If the input is email, then the model doesnt update. If I change the input type to text, nu

4条回答
  •  不要未来只要你来
    2021-02-07 06:37

    It does some validation on then input, so you need to have entered a valid email address before it is bound to the model.

    This is the regex that is used:

    /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/
    

    Basically you need to input an address that is at least a@b.co

提交回复
热议问题