Validate function for colorbox_gallery_custom.
1 string reference to 'colorbox_gallery_custom_validate'
- colorbox_field_formatter_settings_form in ./
colorbox.module - Implements hook_field_formatter_settings_form().
File
-
./
colorbox.module, line 462
Code
function colorbox_gallery_custom_validate($element, &$form_state) {
if (!empty($element['#value']) && !preg_match('!^[a-z0-9_-]+$!', $element['#value'])) {
form_error($element, t('%name must only contain lowercase letters, numbers, hyphen and underscores.', array(
'%name' => $element['#title'],
)));
}
}