function rules_ui_element_token_list_validate in Rules 7.2
FAPI callback to validate a list of tokens.
2 string references to 'rules_ui_element_token_list_validate'
- RulesDataUIListEntity::inputForm in ui/
ui.data.inc - Implements RulesDataDirectInputFormInterface::inputForm().
- RulesDataUIListToken::inputForm in ui/
ui.data.inc - Implements RulesDataDirectInputFormInterface::inputForm().
File
- ui/
ui.forms.inc, line 901 - Rules User Interface forms.
Code
function rules_ui_element_token_list_validate($element, &$form_state) {
foreach ($element['#value'] as $value) {
if ($value !== '' && !entity_property_verify_data_type($value, 'token')) {
form_error($element, t('Each value may only contain lowercase letters, numbers, and underscores and has to start with a letter.'));
}
}
}