disableDynamicValidation does not work
Closed this issue · 4 comments
Hello,
I debugged a little your code and found that actualy disableDynamicValidation is not working. It is because:
function parseOptions(ctrl, validator, attrs) {
var opts = ctrl.autoValidateFormOptions = ctrl.autoValidateFormOptions || angular.copy(validator.defaultFormValidationOptions);
opts.formController = ctrl;
opts.forceValidation = false;
opts.disabled = !validator.isEnabled() || parseBooleanAttributeValue(attrs.disableDynamicValidation , opts.disabled);
opts.validateNonVisibleControls = parseBooleanAttributeValue(attrs.validateNonVisibleControls, opts.validateNonVisibleControls);
opts.validateOnFormSubmit = parseBooleanAttributeValue(attrs.validateOnFormSubmit, opts.validateOnFormSubmit);
opts.removeExternalValidationErrorsOnSubmit = attrs.removeExternalValidationErrorsOnSubmit === undefined ?
opts.removeExternalValidationErrorsOnSubmit :
parseBooleanAttributeValue(attrs.removeExternalValidationErrorsOnSubmit, opts.removeExternalValidationErrorsOnSubmit);
// the library might be globally disabled but enabled on a particular form so check the
// disableDynamicValidation attribute is on the form
if (validator.isEnabled() === false && attrs.disableDynamicValidation === 'false') {
opts.disabled = false;
}
}
Attrs contains "disabledynamicvalidation" not "disableDynamicValidation". Can you fix it ?
I should have write disable-dynamic-validation instead of disableDynamicValidation in form attribute. Can you update wiki page with method references and help ?
Sure!
@qbunia I'm updating the wiki if you feel like giving me a hand?
@jonsamwell sorry right now I dont have much time to help :(