mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Clarify error message by including group type
This commit is contained in:
parent
23d09a2e88
commit
d7689b2cbe
@ -178,13 +178,13 @@ if (isset($_POST['save'])) {
|
||||
|
||||
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
|
||||
|
||||
if ($_POST['gtype'] == local) {
|
||||
if ($_POST['gtype'] != "remote") {
|
||||
if (preg_match("/[^a-zA-Z0-9\.\-_]/", $_POST['groupname'])) {
|
||||
$input_errors[] = gettext("The group name contains invalid characters.");
|
||||
$input_errors[] = sprintf(gettext("The (%s) group name contains invalid characters."), $_POST['gtype']);
|
||||
}
|
||||
} else {
|
||||
if (preg_match("/[^a-zA-Z0-9\.\- _]/", $_POST['groupname'])) {
|
||||
$input_errors[] = gettext("The group name contains invalid characters.");
|
||||
$input_errors[] = sprintf(gettext("The (%s) group name contains invalid characters."), $_POST['gtype']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user