Skip to content

Commit

Permalink
Fixed asp.net error messages on object model validation missing the f…
Browse files Browse the repository at this point in the history
…irst character
  • Loading branch information
DavidLazarescu committed Sep 9, 2023
1 parent c5de6c7 commit 72160f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Presentation/DependencyInjection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ public static void ConfigureIdentity(this IServiceCollection services)
private static ValueTuple<int, string> GetCodeAndMessageFromErrorString(
string errorString)
{
// Return the whole string if it doesn't start with a digit
if (!char.IsDigit(errorString[0]))
return (0, errorString);

int endOfDigits = 0;
foreach(char c in errorString)
{
Expand Down

0 comments on commit 72160f6

Please sign in to comment.