You are here

function creditfield_cvv_validate in Creditfield Form Element 7

Validate callback for credit card cvv number fields.

Parameters

type $element:

1 string reference to 'creditfield_cvv_validate'
creditfield_element_info in ./creditfield.module
Implements hook_element_info().

File

./creditfield.module, line 103

Code

function creditfield_cvv_validate($element) {
  if (!is_numeric($element['#value'])) {
    form_error($element, t('Please enter a valid CVV number.'));
  }
}