Skip to content

Commit

Permalink
Minor style changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ejball committed Aug 8, 2023
1 parent f2bfa57 commit 9ee6016
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Faithlife.DataAnnotations/ValidateObjectAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ public sealed class ValidateObjectAttribute : ValidationAttribute
var innerErrorMessage = string.Join(" ", validationResults.Select(x => x.ErrorMessage).Where(x => x is not null));
return new ValidationResult(
errorMessage: $"{FormatErrorMessage(validationContext.DisplayName)}{(innerErrorMessage.Length == 0 ? "" : $" ({innerErrorMessage})")}",
memberNames: validationContext.MemberName is string memberName ? new[] { memberName } : null);
memberNames: validationContext.MemberName is { } memberName ? new[] { memberName } : null);
}
}
2 changes: 1 addition & 1 deletion tests/Faithlife.DataAnnotations.Tests/ValidatorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Faithlife.DataAnnotations.Tests;

public class ValidatorTests
public sealed class ValidatorTests
{
[Test]
public void ValidateNull()
Expand Down

0 comments on commit 9ee6016

Please sign in to comment.