Skip to content
This repository has been archived by the owner on Jul 1, 2020. It is now read-only.

Show validation errors when the user clicks the 'Submit' button #13

Closed
juanchavezlive opened this issue Mar 24, 2015 · 2 comments
Closed

Comments

@juanchavezlive
Copy link

In order to made more easy for the user the identification of the validation errors, it would be great to show all the validations errors when the users clicks the 'Submit' button, instead of disable the submit button until the user correct all the validation errors.

@juanchavezlive
Copy link
Author

Example:

1

@ghiscoding
Copy link
Owner

Hello, I'm not sure how to do that one yet but in the mean time you can use the Validation Summary that I added last weekend, and connect it to your submit button. Make an ngClick function, on errors prevent the submitting and display errors summary.

$scope.submit = function (event) {
    if($scope.form1.$invalid) {
        $scope.displayValidationSummary = true;
        event.preventDefault();
    }   
}

ghiscoding added a commit that referenced this issue Mar 29, 2015
- Can now also display all errors on a Submit
- Minified script is now englobed under 1 and only 1 file
(angular-validation.min.js)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants