function clientside_validation_add_xregexp in Clientside Validation 6
Same name and namespace in other branches
- 7.2 clientside_validation.module \clientside_validation_add_xregexp()
- 7 clientside_validation.module \clientside_validation_add_xregexp()
1 call to clientside_validation_add_xregexp()
File
- ./
clientside_validation.module, line 334 - Add client side validation to a webform.
Code
function clientside_validation_add_xregexp() {
$variant = variable_get('clientside_validation_xregxp_variant', '');
$lib = FALSE;
if (empty($variant)) {
$lib = xregexp_api_libraries_load('xregexp');
}
else {
$lib = xregexp_api_libraries_load('xregexp', $variant);
}
return $lib && (!isset($lib['error']) || !$lib['error']) ? 1 : 0;
}