My version of easy form validation

I thought about the form validator that I refactored and posted about the other day for a bit and decided I wasn’t happy with all it did. Specifically, I wanted to be able to do more with the validation and more with the messaging. I also thought I could improve on the core functionality a little.

So I rewrote it entirely and borrowed heavily from it to come up with my own version. This version works almost the same way as the previous one with a few differences:

  • the transition is smoother
  • error messages have access to more information about the element they evaluate
  • tests can have conditions specific to individual elements

It still uses css class names, now you can give each field some specific conditions.

You can now see this in action, download the script, and see the docs in our wikitorial.

One Response to “My version of easy form validation”

  1. FormValidator gets a makeover » Clientside Says:

    [...] A while ago I authored a FormValidator class for Mootools and I just spent a few hours adding a lot more functionality to it. In a nutshell: [...]

Leave a Reply

You must be logged in to post a comment.