The FAPI validation project provides advanced rules for FAPI elements. It would be fantastic if I could define advanced rules with FAPI validation, have clientside_validation add validate.js implementations of those rules, and get front and back end validation that behaves the same with and without javascript.

Comments

attiks’s picture

That was our idea as well, I will look into this

attiks’s picture

Jelle started on this (http://drupalcode.org/project/clientside_validation.git/shortlog/refs/he...), most of it is working, but the regular expression rules will be a problem since PCRE and ECMA aren't compatible, is it possible to use POSIX on the server side? See http://www.regular-expressions.info/refflavors.html for the comparison

Jelle_S’s picture

Status: Active » Needs review

FAPI integration was added to the dev branch, testing didn't reveal any bugs so far, if someone finds any, feel free to report them.

Clientside validation was split up into some submodules (currently only in the dev branch):

* clientside_validation_form (for regular form support and cck for Drupal 6)
* clientside_validation_webform (for webform support)
* clientside_validation_fapi (for fapi support)
* clientside_validation (global functionality)

fearlsgroove’s picture

Thanks for your work on this! I plan to review in the next day or three.

Jelle_S’s picture

Status: Needs review » Fixed

Feature added in 6.x-1.16 and 7.x-1.16

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

doublejosh’s picture

Server-side validation messages are immediately hidden when they are the only message, and both client-side validation is on as well as fapi_validation.

Client-side seems to clear the messages on page load.