function wsclient_ui_name_validate in Web service client 7
Validation callback for machine names of parameters or properties.
3 string references to 'wsclient_ui_name_validate'
- _wsclient_ui_global_parameter_row in wsclient_ui/
wsclient_ui.inc - Generates a row in the global parameter table.
- _wsclient_ui_parameter_row in wsclient_ui/
wsclient_ui.inc - Generates a row in the parameter table.
- _wsclient_ui_property_row in wsclient_ui/
wsclient_ui.inc - Generates a row in the properties table.
File
- wsclient_ui/
wsclient_ui.inc, line 793 - WSClient UI - implements service description management and configuration screens.
Code
function wsclient_ui_name_validate($element, &$form_state) {
if ($element['#value'] && !preg_match('!^[A-Za-z0-9_]+$!', $element['#value'])) {
form_error($element, t('Machine names must contain only letters, numbers, and underscores.'));
}
}