function _validate_keys_string in Shadowbox 6.2
Same name and namespace in other branches
- 5.2 shadowbox.module \_validate_keys_string()
- 5 shadowbox.module \_validate_keys_string()
- 6.4 shadowbox.module \_validate_keys_string()
- 6 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.
File
- ./
shadowbox.module, line 1031 - 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);
}