candreoliveira / ngMask

Best Angular mask alternative! No jQuery, pure JS. About ~6kb!
http://candreoliveira.github.io/#/ngMask
ISC License
419 stars 171 forks source link

Using ng-model-options="{ updateOn: 'blur' }" breaks it #48

Open ShlomoRosenheimer opened 9 years ago

ShlomoRosenheimer commented 9 years ago

Using ng-model-options="{ updateOn: 'blur' }" breaks the restrictions..................

martea commented 9 years ago

solved it by removing the controller.$isEmpty(controller.$modelValue), since when you have option on blur you may not have set the modelvalue yet, depending on other validation directives, and you always set the modelvalue in the end of the function, you could replace it with check if the viewvalue differs from 0