As said previously a rewrite of the validation engine has been in the work for sometimes and today it is finally live, the API changed a lot, might be a good idea to have a look at the new documentation if you are upgrading.

I will be updating the documentation today, but the most up to date doc will always be the readme on github. The legacy 1.7 documentation and download can be found under package when you hit download on github

Time to stop squeezing ketchup (inside joke) and hail to the beast.

22 thoughts on “Form validation engine 2.0 is live

  1. Hello Cedric,

    I don’y know if you speak french, so I’m gonna try with my poor english

    You have many orthographical mistakes in the french js.

    I corrected them, where should I send the corrected file ?

  2. It looks like you don’t use standard html5 attributes like requied 🙁
    Is it possible to add support for it?

  3. Jack, the project is free, for whatever you want to do with it

    @Petr It could be moved there, but not for now

  4. Hi,
    great new version !
    However, how to validate a form cut under “tabs” ?
    Each tab contains a part of the form with fields but only one tab is displayed at a time, while other parts are hidden with css style.
    When using validate, only fields which are displayed are validated, others “css hidden” fields are not validated.

    Thanks a lot for your Job !

  5. Great to find it’s been upgraded. It’s so nice ..
    I would like to know how to stop form submission after validation. Just like click submit, it validates the form, but not submits the form, appreciate if anyone would help.

    1. :), thank you.. I just figured it out.
      My logic was:
      first: validate the form values; then if( $(‘#formID’).validationEngine(‘validate’) == true), then submit the form values to another php file to process via POST method. and now, it’s just working as I expected. very nice and thank you.

      But when I was still cheering for what I’ve done, another problem just started bothering me. The scenario is like I would like to validate a field which is gonna have an email address, and then ajax it with database. After I spent some time on reading all API documentations and the sample source codes, I decided to use codes like following:

      // turn ajax form on, and bind #formID to validationEngine;
      $(“#formID”).validationEngine({ ajaxFormValidation: true, });

      then in the form code, I wrote it like:

      but it doesnt work, and even nothing logged in java console (i’m using firebugs). then I tested validate options one by one, and I found when I use ajax only which means without ‘required’ and ‘custom’ fields, it actually works.

      I looked into the validationEngine.js code, but I’m really js newbie and got no luck. Do you have another suggestions please? thanks in advance…

      1. oh, well, the code was filtered..let me simpy omit some tags.
        (input class=”validate[required, custom[email], ajax[ajaxUserCall]] text-input” type=”text” id=”user_email_user” name=”user_email_user” value=””)

  6. Great validation script.

    One small issue, the email validation does not seem to work on the iPad or iPhone (Safari). It marks up correct email addresses as “Invalid email address”. Any ideas on how to fix this?


    1. This issue seems related to the email validation regular expression. When I use my own custom function and regular expression it works fine on the iPhone and iPad.

      The regular expression I’m using for email validation:

  7. I’m sorry, but I think finally I got the reason why I thought it didnt work.

    input class=”validate[required, custom[email], ajax[ajaxUserCall]] text-input” type=”text” id=”userEmail” name=”userEmail” value=””

    It seems that any error messages about custom[email] will not show up uless you submit the form. I’m just used to the previous version of validationEngine, and was curious why it didnt work, 🙂

    Again, thank you for you reply, and it’s really sweeet project.

  8. What versions of jQuery are the validation engine compatible with? Will it work with jQuery 1.3?

    I know 1.4 is a vast improvement on 1.3, but a large number of Drupal 6.x contrib modules are not compatible with 1.4, so we’re stuck with 1.3 for the time being.


  9. hello,

    i have a question about validation with a custom Func:

    I have 3 inputs but only one of them is required.

    this rules are only called when i enter a value into the input?… not good…

    Second try:

    this rule is excuted every time I validate the form. It doesn’t matter if one of the other inputs has a value.

    Any idea?


  10. @ jesper, it will not work with 1.3 from what I know, I had a 1.3 package but unfortunately I do not support it anymore

    @traedamatic we currently have a bug with non required input

    @Frank will have a look, ajax had a rewrite

    @Robert thank, will change the regex

    1. No problem Cedric. I think it was related to the previous email regex not allowing uppercase letters, but the iPhone and iPad default to making the first letter uppercase.

      Thanks for a great validation tool.

  11. Your validation is great and has a nice unobtrusive UI. However it would be nice to be able to create validatable fields in javascript.

    Currently on form.validationEngine(‘attach’); the code binds all the blur events to validate the form. I have parts of the from that gets dynamically added after the page load. It would be nice to be able to attach the validation function to those dynamically created field too.

  12. This is a very nice validation tool. Thank you.

    I’m new to jquery and have a question. I have a form with two submit buttons. The first continues to the next question, the second to the previous. I would like to turn of validation when I go to the previous question. How do I do that?

Comments are closed.