Instead of resorting to disable the module altogether (as suggest here), I'd like to propose my addition as a new feature (Lisa in that discussion) - allowing to disable client validation for a form element and not just a field:

In the clientside_validation/clientside_validation_form/clientside_validation_form.module file, function clientside_validation_regular, just after this code (line 51):

if (isset($field_info['exclude_cv']) && $field_info['exclude_cv'] == '1') {
  $skipvalidation = TRUE;
}

I suggest to add:

elseif (isset($element['#exclude_cv']) && $element['#exclude_cv']) {
    //skip validation if defined so by form element
    $skipvalidation = TRUE;
}

Then, a developer can disable validation per form element by just setting #exclude_cv to TRUE:

$form['startdate'] = array(
    '#type' => 'date_popup',
    ...
    '#exclude_cv' => TRUE,
);

Comments

attiks’s picture

Version: 7.x-1.37 » 7.x-1.x-dev

Any chance you can you provide a patch, seems like a good idea

Jelle_S’s picture

Status: Active » Fixed

Feature added in the latest dev version

Status: Fixed » Closed (fixed)

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