-2

how can i call a function if the validation of a form element fails. My goal is to show additional items on the page if an error occurs during the validation. I'm using unobtrusive form validation. It would be nice to define an additional data element on the form elements tag like data-error-callback or something similiar.

Is there a way to hook into the validation process to get this working?

Thanks

Sparky
  • 98,165
  • 25
  • 199
  • 285
raisr
  • 13
  • 2

1 Answers1

1

Maybe this link can help you - it's a project called JQuery Validation Hook, that

Adds hooks to jQuery.validate's form/element validation methods (via trigger())

https://gist.github.com/remi/957732

Retired_User
  • 1,595
  • 11
  • 17
  • Please don't simply post a link as an answer without any explanation whatsoever. When the link goes dead we'll have no idea what this was supposed to be. – Sparky Feb 21 '13 at 00:29
  • 1
    @Sparky, I agree (i'll edit the answer), but in this case, as it´s a link to a project. If the link is gone means the project is gone, so no matter how many explanation I give, it won't be useful (unless I post source code). – Retired_User Feb 21 '13 at 13:28