Skip to content
Snippets Groups Projects
Commit c41616cc authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-5234: coding standards

parent e07f4c02
No related branches found
No related tags found
1 merge request!184Feature/istwcms 5234 ebremner hero
......@@ -287,7 +287,13 @@ function _uw_cfg_common_form_webform_settings_access_form_validate(array $form,
// Raise error for invalid groups.
foreach ($fields[$field] as $group) {
if (!preg_match('/^[A-Za-z0-9_& -]+$/', $group)) {
$form_state->setError($form['access']['create']['uw_ad_access'][$field], t('Invalid group: %group.', ['%group' => substr($group, 0, 100)]));
$form_state->setError(
$form['access']['create']['uw_ad_access'][$field],
t(
'Invalid group: %group.',
['%group' => substr($group, 0, 100)]
)
);
break;
}
}
......@@ -295,7 +301,10 @@ function _uw_cfg_common_form_webform_settings_access_form_validate(array $form,
// Raise error if no groups are entered.
if (!array_filter($fields)) {
$form_state->setError($form['access']['create']['uw_ad_access'], t('Provide at least one group to use for access control.'));
$form_state->setError(
$form['access']['create']['uw_ad_access'],
t('Provide at least one group to use for access control.')
);
}
// Fall-through.
case 'all':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment