Skip to content

Commit

Permalink
Fix invalid regex by moving hyphen to last character.
Browse files Browse the repository at this point in the history
  • Loading branch information
somiaj committed Nov 24, 2024
1 parent 154b597 commit 64de78c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/WeBWorK/ContentGenerator/CourseAdmin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ sub add_course_validate ($c) {
for (1 .. $number_of_additional_users) {
my $userID = trim_spaces($c->param("add_initial_userID_$_")) || '';

unless ($userID =~ /^[\w-.,]*$/) {
unless ($userID =~ /^[\w.,-]*$/) {
push @errors,
$c->maketext(
'User ID number [_1] may only contain letters, numbers, hyphens, periods, commas, '
Expand Down

0 comments on commit 64de78c

Please sign in to comment.