{"action":"created","issue":{"url":"https://api.github.com/repos/1000hz/bootstrap-validator/issues/145","labels_url":"https://api.github.com/repos/1000hz/bootstrap-validator/issues/145/labels{/name}","comments_url":"https://api.github.com/repos/1000hz/bootstrap-validator/issues/145/comments","events_url":"https://api.github.com/repos/1000hz/bootstrap-validator/issues/145/events","html_url":"https://github.com/1000hz/bootstrap-validator/issues/145","id":88899630,"number":145,"title":"Trigger custom error *after* validation?","user":{"login":"willy0275","id":4225044,"avatar_url":"https://avatars.githubusercontent.com/u/4225044?v=3","gravatar_id":"","url":"https://api.github.com/users/willy0275","html_url":"https://github.com/willy0275","followers_url":"https://api.github.com/users/willy0275/followers","following_url":"https://api.github.com/users/willy0275/following{/other_user}","gists_url":"https://api.github.com/users/willy0275/gists{/gist_id}","starred_url":"https://api.github.com/users/willy0275/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willy0275/subscriptions","organizations_url":"https://api.github.com/users/willy0275/orgs","repos_url":"https://api.github.com/users/willy0275/repos","events_url":"https://api.github.com/users/willy0275/events{/privacy}","received_events_url":"https://api.github.com/users/willy0275/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-06-17T03:22:07Z","updated_at":"2015-06-18T02:03:35Z","closed_at":"2015-06-17T06:50:47Z","body":"I have a situation where I'd like to validate the form first, and when the form is valid I then submit the form with a jQuery ajax call which returns a json with possible server side errors. More specifically, there is one input where the text is invalid if it exists already in the database. I know I could use a custom error handler with ajax, but I don't want that check to be done when the user is entering data on the form, I need to manually trigger that error after the form is validated and the ajax call is done. \r\n\r\nI'm guessing I would need something like this: \r\n\r\n```\r\n$().validator('error', {\r\n    'name-of-input',\r\n    'error-message'\r\n});\r\n```\r\nThis method would mark the input as having an error, so the red border and highlighted label would show up and the error-message would show up in the related error div. \r\n\r\nIs there a way currently to achieve this?"},"comment":{"url":"https://api.github.com/repos/1000hz/bootstrap-validator/issues/comments/113010331","html_url":"https://github.com/1000hz/bootstrap-validator/issues/145#issuecomment-113010331","issue_url":"https://api.github.com/repos/1000hz/bootstrap-validator/issues/145","id":113010331,"user":{"login":"willy0275","id":4225044,"avatar_url":"https://avatars.githubusercontent.com/u/4225044?v=3","gravatar_id":"","url":"https://api.github.com/users/willy0275","html_url":"https://github.com/willy0275","followers_url":"https://api.github.com/users/willy0275/followers","following_url":"https://api.github.com/users/willy0275/following{/other_user}","gists_url":"https://api.github.com/users/willy0275/gists{/gist_id}","starred_url":"https://api.github.com/users/willy0275/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willy0275/subscriptions","organizations_url":"https://api.github.com/users/willy0275/orgs","repos_url":"https://api.github.com/users/willy0275/repos","events_url":"https://api.github.com/users/willy0275/events{/privacy}","received_events_url":"https://api.github.com/users/willy0275/received_events","type":"User","site_admin":false},"created_at":"2015-06-18T02:03:35Z","updated_at":"2015-06-18T02:03:35Z","body":"By the way one thing I misunderstood and I can see now with the profiler \nwhile testing, is that remote validation is *also* done at form submit \ntime, so that you can actually enforce validating remotely at the final \nsubmit stage. I thought the remote call was only done when interacting \nwith the input directly. It's not really clear in the doc. Thanks again!\n"}}