function xbbcode_list_style_validate in Extensible BBCode 7
Same name and namespace in other branches
- 8 xbbcode_list/xbbcode_list.module \xbbcode_list_style_validate()
- 6 xbbcode_list/xbbcode_list.module \xbbcode_list_style_validate()
1 string reference to 'xbbcode_list_style_validate'
- xbbcode_list_admin_settings in xbbcode_list/
xbbcode_list.module
File
- xbbcode_list/
xbbcode_list.module, line 164
Code
function xbbcode_list_style_validate($element) {
$valid_styles = array(
'upper-alpha',
'lower-alpha',
'upper-roman',
'lower-roman',
'numeric',
);
$types = preg_split('/ *, */', $element['#value']);
foreach ($types as $type) {
if (!in_array($type, $valid_styles)) {
form_error($element, t('%type is not a valid style.', array(
'%type' => $type,
)));
}
}
}