From 2c353f2e7faf45642930acd0e54c816e278671ce Mon Sep 17 00:00:00 2001 From: Scott Pouliot Date: Mon, 11 May 2026 18:20:43 -0400 Subject: [PATCH] Three small UX fixes: customer contact validation, pagination dropdown width - Customer validation now accepts Mobile Phone as a valid contact method; previously only Email or Phone satisfied the requirement - Create customer hint text updated to match the new validation rule - Pagination page-size dropdown gets min-width: 5rem so the number has breathing room from the caret arrow across all paginated lists Co-Authored-By: Claude Sonnet 4.6 --- .../DTOs/Customer/CustomerDtos.cs | 8 ++++---- src/PowderCoating.Web/Views/Customers/Create.cshtml | 2 +- src/PowderCoating.Web/Views/Shared/_Pagination.cshtml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/PowderCoating.Application/DTOs/Customer/CustomerDtos.cs b/src/PowderCoating.Application/DTOs/Customer/CustomerDtos.cs index 9663f0e..b0dc18f 100644 --- a/src/PowderCoating.Application/DTOs/Customer/CustomerDtos.cs +++ b/src/PowderCoating.Application/DTOs/Customer/CustomerDtos.cs @@ -140,12 +140,12 @@ public class CreateCustomerDto : IValidatableObject new[] { nameof(CompanyName), nameof(ContactFirstName), nameof(ContactLastName) }); } - // At least one contact method is required (Email OR Phone) - if (string.IsNullOrWhiteSpace(Email) && string.IsNullOrWhiteSpace(Phone)) + // At least one contact method is required (Email, Phone, or Mobile Phone) + if (string.IsNullOrWhiteSpace(Email) && string.IsNullOrWhiteSpace(Phone) && string.IsNullOrWhiteSpace(MobilePhone)) { yield return new ValidationResult( - "Please provide at least one contact method (Email or Phone)", - new[] { nameof(Email), nameof(Phone) }); + "Please provide at least one contact method (Email, Phone, or Mobile Phone)", + new[] { nameof(Email), nameof(Phone), nameof(MobilePhone) }); } // Validate each address in comma-separated email fields diff --git a/src/PowderCoating.Web/Views/Customers/Create.cshtml b/src/PowderCoating.Web/Views/Customers/Create.cshtml index fe8c25b..70df405 100644 --- a/src/PowderCoating.Web/Views/Customers/Create.cshtml +++ b/src/PowderCoating.Web/Views/Customers/Create.cshtml @@ -59,7 +59,7 @@
- Required: At least one of Company Name, First Name, or Last Name — and at least one of Email or Phone. + Required: At least one of Company Name, First Name, or Last Name — and at least one of Email, Phone, or Mobile Phone.
diff --git a/src/PowderCoating.Web/Views/Shared/_Pagination.cshtml b/src/PowderCoating.Web/Views/Shared/_Pagination.cshtml index 9599624..ef7918a 100644 --- a/src/PowderCoating.Web/Views/Shared/_Pagination.cshtml +++ b/src/PowderCoating.Web/Views/Shared/_Pagination.cshtml @@ -24,7 +24,7 @@ Showing @Model.StartIndex-@Model.EndIndex of @Model.TotalCount results | -