function colorbox_gallery_custom_validate in Colorbox 7.2
Validate function for colorbox_gallery_custom.
1 string reference to 'colorbox_gallery_custom_validate'
File
- ./
colorbox.module, line 413 - A light-weight, customizable lightbox plugin for jQuery 1.3.
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'],
)));
}
}