function jquery_social_stream_validate_container_id in jQuery social stream 8.2
Same name and namespace in other branches
- 7.2 jquery_social_stream.module \jquery_social_stream_validate_container_id()
Validate callback for container id.
1 string reference to 'jquery_social_stream_validate_container_id'
- jquery_social_stream_settings_form in ./
jquery_social_stream.module - General stream settings.
File
- ./
jquery_social_stream.module, line 745 - Code for the Campaign social media module.
Code
function jquery_social_stream_validate_container_id($element, &$form_state) {
$value = $element['#value'];
if ($value !== '' && !preg_match('/^[-_a-z]+$/', $value)) {
form_error($element, t('%name must contain only lowercase letters, numbers, hyphens and underscores.', array(
'%name' => $element['#title'],
)));
}
}