Skip to content

Commit

Permalink
Added space to Regex of ValidateIdString, temporary
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesFinsveen committed Dec 6, 2024
1 parent 986d024 commit c0b4545
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PCAxis.Sql/ApiUtils/ApiUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ private static string ValidateIdString(string input)
throw new ArgumentException("The id string cannot be null.");
}

if (!Regex.IsMatch(input, @"^[a-zA-Z0-9._]+$", RegexOptions.None, TimeSpan.FromSeconds(2)))
if (!Regex.IsMatch(input, @"^[a-zA-Z0-9._\s]+$", RegexOptions.None, TimeSpan.FromSeconds(2)))
{
throw new ArgumentException("The string contains invalid characters. Only digits, letters, underscores, and periods are allowed.");
throw new ArgumentException("The string contains invalid characters. Only digits, letters, underscores, periods and spaces are allowed.");
}
return input;
}
Expand Down

0 comments on commit c0b4545

Please sign in to comment.