Skip to content
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.

ui-mask, disable validation #139

Closed
mdedetrich opened this issue Nov 19, 2013 · 2 comments
Closed

ui-mask, disable validation #139

mdedetrich opened this issue Nov 19, 2013 · 2 comments
Labels

Comments

@mdedetrich
Copy link

Is there currently an option to prevent ui-mask from running validation (in other words, just to provide masking and not do any validation.

I am trying to use ui-mask with my own custom validation (using the validation guide provided here http://docs.angularjs.org/guide/forms). Although the validation itself works when you add for '_' to account for how ui-mask works, the value returned by the validation is always set by ui-mask, I wan't the return value of the validation to be set by my own validator

The personal use case is pretty simple, I have a date in an input field which is the form 99-99-9999. I however want to use my own validator (a wrapper around moment.js) to actually check if the date is valid. Furthermore, my own validator actually returns a date object (which is stored in the ngModel). If I try to use ui-mask when combined with my validator, although it uses my validator, the variable that ends up getting returned to the model ends up being a string, not a date object

@PowerKiKi
Copy link
Contributor

UI.Utils modules was split in individuals repositories. If still valid, please consider re-submitting on its dedicated repository: https://github.com/angular-ui/ui-mask

See the README for details.

@MAbdulHalim
Copy link

just add "?" like ui-mask="(?9?9?9) ?9?9?9?9-?9?9?9?9"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants