When I export my field validation rules to features, I end up with this error.
Warning: Invalid argument supplied for foreach() in element_children() (line 6288 of /Users/jucallme/Sites/systemseed/concern/7.x-1.x/build/includes/common.inc
that is called from clientside_validation_field_validation.module [line] => 30
Here is the export of one of the rules.
/**
* Implements hook_default_field_validation_rule().
*/
function MY_FEATURE_MODULE_default_field_validation_rule() {
$export = array();
$rule = new stdClass();
$rule->disabled = FALSE; /* Edit this to true to make a default rule disabled initially */
$rule->api_version = 2;
$rule->rulename = 'First name can only contain alphabetic characters.';
$rule->name = 'first_name_alpha_billing';
$rule->field_name = 'field_cw_profile_firstname';
$rule->col = 'value';
$rule->entity_type = 'commerce_customer_profile';
$rule->bundle = 'billing';
$rule->validator = 'field_validation_regex_validator';
$rule->settings = array(
'data' => '^[a-zA-Z]*$',
'errors' => 0,
);
$rule->error_message = 'First name can only contain alphabetic characters.';
$export['first_name_alpha_billing'] = $rule;
return $export;
}
Comments
Comment #1
g089h515r806 commentedDisable clientside_validation_field_validation.module, and try it agian.
Comment #2
shalinee commentedif we disable the clientside_validation_field_validation.module, validation is not working