Commit 330531f7 authored by Jelle Sebreghts's avatar Jelle Sebreghts
Browse files

updated example

parent 2305a8db
......@@ -88,6 +88,21 @@ function hook_clientside_validation_rule_alter(&$js_rules, $element, $context) {
}
break;
case 'element_validate':
if (in_array('_container_validate', $context['functions'])) {
_clientside_validation_set_not_equal(
$element['textfield_one']['#name'],
$element['textfield_one']['#title'],
array(
'form_key' => $element['textfield_two']['#name'],
'name' => $element['textfield_two']['#title']
),
$js_rules,
t("The two fields cannot have the same value")
);
}
break;
default:
break;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment