Skip to content

Commit

Permalink
woops
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholas-renaud committed Feb 29, 2024
1 parent 94f78cb commit b591c47
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Workleap.ComponentModel.DataAnnotations/GuidAttribute.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.ComponentModel.DataAnnotations;
using System.Globalization;

Expand Down Expand Up @@ -37,8 +37,9 @@ public GuidAttribute(string format)

private bool IsValidGuid(string valueAsString)
{
Guid guid;
return this.Format is null
? Guid.TryParse(valueAsString, out Guid guid) && this.IsValidGuid(guid)
? Guid.TryParse(valueAsString, out guid) && this.IsValidGuid(guid)
: Guid.TryParseExact(valueAsString, this.Format, out guid) && this.IsValidGuid(guid);
}

Expand Down

0 comments on commit b591c47

Please sign in to comment.