Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to dinamically remove a Validator from a field #71

Open
appfabtech opened this issue Jan 13, 2015 · 1 comment
Open

How to dinamically remove a Validator from a field #71

appfabtech opened this issue Jan 13, 2015 · 1 comment

Comments

@appfabtech
Copy link

Hello
I need to handle my form dinamically.
I mean to enable and disable validation on certain fields due to other constraints
More in detail I have an email field (set by default with addValidator:EZFormEmailAddressValidator) I need to disable in a specific condition (so that EZform doesn't check if it contains an email address)
Is there a way to do it?

Thanks

Paolo

@chrismiles
Copy link
Owner

A recent change adds -[EZFormField setValidator:] so you can replace validators on a field. Passing nil will clear validators, so you could use this to clear and re-set validators as you need them.

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

No branches or pull requests

2 participants