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