diff --git a/531Calculator/Components/UserEditForm.razor b/531Calculator/Components/UserEditForm.razor index a9384fb..dd56113 100644 --- a/531Calculator/Components/UserEditForm.razor +++ b/531Calculator/Components/UserEditForm.razor @@ -21,12 +21,9 @@ @if (NameRequired) { - - -
- - -
+ + + } diff --git a/531Calculator/DataAnnotations/RequiredIfAttribute.cs b/531Calculator/DataAnnotations/RequiredIfAttribute.cs index 3d9dfc7..a27d460 100644 --- a/531Calculator/DataAnnotations/RequiredIfAttribute.cs +++ b/531Calculator/DataAnnotations/RequiredIfAttribute.cs @@ -32,7 +32,8 @@ namespace FiveThreeOneCalculator.DataAnnotations if (!_innerAttribute.IsValid(value)) { string name = validationContext.DisplayName; - return new ValidationResult(ErrorMessage = name + " Is required."); + return new ValidationResult(ErrorMessage = name + " Is required.", + new string[] { name }); } } return ValidationResult.Success;