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

validation always validate even if ng-required =false and ng-disabled =true #61

Open
Stefanus87 opened this issue Feb 17, 2015 · 1 comment

Comments

@Stefanus87
Copy link

Please help
I have a form with allot of input fields. The fields is disabled with certain senarios based on certain fields on the form. The validation validate the fields even if it is not reguired and disabled.
Is this a bug or a coding issue?
Thanks

@nelsonomuto
Copy link
Owner

Good point, the validations are independent of angular ng directives. So ng-required and ng-disabled will not have an effect on them. This is not a bug.

For good measure I will add a new feature that will give you the ability to toggle validations on and off (validation-active="true/false" depending on whether you wish for the validations to trigger or not.)

In the meantime you may workaround this by not adding an identical input element without the validation directives and add your ng-required and ng-disabled to it, then apply logic to hide the original input element and display the new one whenever you wish to disable validations.

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

No branches or pull requests

2 participants