angular-ui / ui-mask

Mask on an input field so the user can only type pre-determined pattern
https://htmlpreview.github.io/?https://github.com/angular-ui/ui-mask/master/demo/index.html
MIT License
391 stars 258 forks source link

Mask value being setted as 0 if null #234

Open Rui90 opened 6 years ago

Rui90 commented 6 years ago

I have this input using ui-mask

<input type="text" ui-mask-placeholder ui-mask="99999-999" ng-model="AddressPostalCode" name="AddressPostalCode">

But if I do not set a value, my scope will have the value 0, and this info will be sent. Why? Is there no simple way to if the mask is not correct or something, it just goes as null?