You are here

function webform_validate_time in Webform 5

Same name and namespace in other branches
  1. 5.2 components/time.inc \webform_validate_time()
  2. 6.3 components/time.inc \webform_validate_time()
  3. 6.2 components/time.inc \webform_validate_time()
  4. 7.4 components/time.inc \webform_validate_time()
  5. 7.3 components/time.inc \webform_validate_time()

File

components/time.inc, line 136

Code

function webform_validate_time($field, $field_name, $component_name, $mandatory) {
  if (!is_numeric($field['#value']) && $mandatory) {
    form_set_error($field_name, $component_name . " " . $field_name . " " . t(" field is required"));
    return false;
  }
}