You are here

function webform_render_matrix_textfield_Numeric in Webform Matrix Component 7

Same name in this branch
  1. 7 webform_matrix_component.api.php \webform_render_matrix_textfield_Numeric()
  2. 7 components/matrix.inc \webform_render_matrix_textfield_Numeric()

Validate textfield Numeric validation.

File

components/matrix.inc, line 792
Webform module matrix component.

Code

function webform_render_matrix_textfield_Numeric($element, $form_state) {
  $value = $element['#value'];
  if (!empty($value)) {
    if (!is_numeric($value)) {
      form_error($element, t('Only Numeric value is allowed'));
    }
  }
}