Angular Validation Q&A

Can I validate the form when init ? #

angular-validation will check iff $dirty status is true, means $pristine status doesn't do the validation. You are suggested to use submit to trigger validation at the first.

$scope.form = {
    number: null,
    submit: function (form) {

        $validationProvider.validate(form);
    }
};

$timeout(function () {
  $validationProvider.validate($scope.Form);
});
  

What's the differentiate between validator-method `submit` and `submit-only`#

`submit` : when user click submit, then start watching using `watch` to validate
`submit-only` : when user click `submit`, doesn't validate through `watch` until `submit` button is clicked.

More API Documentation
Q&A
Found a bug/issue?
Buy me a Star!
Fork me on Github