function webform_validation_get_rule in Webform Validation 6
Same name and namespace in other branches
- 7 webform_validation.rules.inc \webform_validation_get_rule()
Get a rule entry
1 call to webform_validation_get_rule()
- webform_validation_rule_load in ./
webform_validation.module - Loads validation rule from menu parameter
File
- ./
webform_validation.rules.inc, line 11 - provides API and management functions for the webform validation rules
Code
function webform_validation_get_rule($ruleid) {
$result = db_query("SELECT ruleid, rulename, nid, validator, data, error_message FROM {webform_validation_rule} WHERE ruleid = %d", $ruleid);
if ($rule = db_fetch_array($result)) {
$rule['components'] = webform_validation_get_rule_components($ruleid, $rule['nid']);
}
return $rule;
}