function _validate_keys_string in Shadowbox 5
Same name and namespace in other branches
- 5.2 shadowbox.module \_validate_keys_string()
- 6.4 shadowbox.module \_validate_keys_string()
- 6 shadowbox.module \_validate_keys_string()
- 6.2 shadowbox.module \_validate_keys_string()
- 6.3 shadowbox.module \_validate_keys_string()
- 7.4 shadowbox.admin.inc \_validate_keys_string()
- 7.3 shadowbox.admin.inc \_validate_keys_string()
Validate a delimited string of keys and/or keycodes.
Parameters
$input: A delimited string of keys and/or keycodes to validate.
Return value
TRUE if $input is valid otherwise FALSE.
1 call to _validate_keys_string()
- shadowbox_admin_settings_validate in ./
shadowbox.module - Validate admin settings form inputs.
File
- ./
shadowbox.module, line 816 - Shadowbox, a JavaScript media viewer application for displaying content in a modal dialogue.
Code
function _validate_keys_string($input) {
foreach (explode(' ', $input) as $value) {
$items[] = preg_match('!^(?:[a-z]|\\d{1,3})$!i', $value);
}
return in_array(FALSE, $items);
}