{"action":"created","issue":{"url":"https://api.github.com/repos/jonsamwell/angular-auto-validate/issues/66","labels_url":"https://api.github.com/repos/jonsamwell/angular-auto-validate/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/jonsamwell/angular-auto-validate/issues/66/comments","events_url":"https://api.github.com/repos/jonsamwell/angular-auto-validate/issues/66/events","html_url":"https://github.com/jonsamwell/angular-auto-validate/issues/66","id":75586130,"number":66,"title":"Validation might have an option to start validating on submit","user":{"login":"wkwiatek","id":3719897,"avatar_url":"https://avatars.githubusercontent.com/u/3719897?v=3","gravatar_id":"","url":"https://api.github.com/users/wkwiatek","html_url":"https://github.com/wkwiatek","followers_url":"https://api.github.com/users/wkwiatek/followers","following_url":"https://api.github.com/users/wkwiatek/following{/other_user}","gists_url":"https://api.github.com/users/wkwiatek/gists{/gist_id}","starred_url":"https://api.github.com/users/wkwiatek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wkwiatek/subscriptions","organizations_url":"https://api.github.com/users/wkwiatek/orgs","repos_url":"https://api.github.com/users/wkwiatek/repos","events_url":"https://api.github.com/users/wkwiatek/events{/privacy}","received_events_url":"https://api.github.com/users/wkwiatek/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jonsamwell/angular-auto-validate/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/jonsamwell/angular-auto-validate/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-05-12T12:30:04Z","updated_at":"2015-08-21T03:11:16Z","closed_at":"2015-08-21T03:11:16Z","body":"It would be nice to have an option to choose whether validation should start immediately or after first click on submit. In **AngularJS 1.3** it is pretty easy to check as form has proper value set in `$submitted` flag. \r\n\r\nThe way to check fields after first submit is really nice from UX perspective as it doesn't mess with form until user enters something wrong."},"comment":{"url":"https://api.github.com/repos/jonsamwell/angular-auto-validate/issues/comments/133262510","html_url":"https://github.com/jonsamwell/angular-auto-validate/issues/66#issuecomment-133262510","issue_url":"https://api.github.com/repos/jonsamwell/angular-auto-validate/issues/66","id":133262510,"user":{"login":"jonsamwell","id":3694497,"avatar_url":"https://avatars.githubusercontent.com/u/3694497?v=3","gravatar_id":"","url":"https://api.github.com/users/jonsamwell","html_url":"https://github.com/jonsamwell","followers_url":"https://api.github.com/users/jonsamwell/followers","following_url":"https://api.github.com/users/jonsamwell/following{/other_user}","gists_url":"https://api.github.com/users/jonsamwell/gists{/gist_id}","starred_url":"https://api.github.com/users/jonsamwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonsamwell/subscriptions","organizations_url":"https://api.github.com/users/jonsamwell/orgs","repos_url":"https://api.github.com/users/jonsamwell/repos","events_url":"https://api.github.com/users/jonsamwell/events{/privacy}","received_events_url":"https://api.github.com/users/jonsamwell/received_events","type":"User","site_admin":false},"created_at":"2015-08-21T03:11:16Z","updated_at":"2015-08-21T03:11:16Z","body":"@jgesser @wkwiatek This in finally working (sorry for the delay).  You'll find it in the latest release (v1.18.13) and here is a working plunker http://plnkr.co/edit/S5YTRYPQM8unAjDHLsxR?p=preview\r\n\r\nBasically just add the attribute 'validate-on-form-submit=\"true\"' to the form node.\r\n\r\n```\r\n<form novalidate=\"novalidate\" ng-submit=\"onSubmit()\"\r\n      validate-on-form-submit=\"true\">\r\n  <div class=\"form-group\">\r\n    <label for=\"exampleInputName\">Name</label>\r\n    <input type=\"text\" class=\"form-control\" id=\"exampleInputName\" placeholder=\"Name\" ng-model=\"vm.model.name\" required=\"\" ng-minlength=\"6\" ng-maxlength=\"255\" />\r\n  </div>\r\n  <div class=\"form-group\">\r\n    <label for=\"exampleInputEmail\">Email address</label>\r\n    <input type=\"email\" class=\"form-control\" id=\"exampleInputEmail\" placeholder=\"Email\" ng-model=\"vm.model.email\" required=\"\" />\r\n  </div>\r\n  <button type=\"submit\" class=\"btn btn-default\">Submit Form</button>\r\n  <button type=\"reset\" class=\"btn btn-secondary\">Rest Form</button>\r\n</form>\r\n```\r\n\r\nOr you could just change the libraries default value for it here\r\n\r\nhttps://github.com/jonsamwell/angular-auto-validate/blob/master/src/providers/validator.js#L275\r\n\r\n```\r\n   function RunFn(validator) {\r\n      validator.defaultFormValidationOptions.validateOnFormSubmit = true;\r\n    }\r\n    \r\n    RunFn.$inject = [\r\n      'validator'\r\n    ];\r\n   \r\n    app.config(RunFn);\r\n```\r\n"}}