You are here

function field_validation_manage_rule_validate in Field Validation 7

Validation handler to add / edit a rule

File

./field_validation.admin.inc, line 260
Manages validation rules administration UI

Code

function field_validation_manage_rule_validate($form, &$form_state) {
  $values = $form_state['values'];
  if ($values['action'] == 'edit') {
    if (!is_numeric($values['ruleid']) || $values['ruleid'] == 0) {
      form_set_error(NULL, t('A problem occurred while editing this rule. Please try again.'));
    }
  }
}