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 <noreply@anthropic.com>
This commit is contained in:
2026-05-11 18:20:43 -04:00
parent c02a5584b4
commit 2c353f2e7f
3 changed files with 6 additions and 6 deletions
@@ -140,12 +140,12 @@ public class CreateCustomerDto : IValidatableObject
new[] { nameof(CompanyName), nameof(ContactFirstName), nameof(ContactLastName) }); new[] { nameof(CompanyName), nameof(ContactFirstName), nameof(ContactLastName) });
} }
// At least one contact method is required (Email OR Phone) // At least one contact method is required (Email, Phone, or Mobile Phone)
if (string.IsNullOrWhiteSpace(Email) && string.IsNullOrWhiteSpace(Phone)) if (string.IsNullOrWhiteSpace(Email) && string.IsNullOrWhiteSpace(Phone) && string.IsNullOrWhiteSpace(MobilePhone))
{ {
yield return new ValidationResult( yield return new ValidationResult(
"Please provide at least one contact method (Email or Phone)", "Please provide at least one contact method (Email, Phone, or Mobile Phone)",
new[] { nameof(Email), nameof(Phone) }); new[] { nameof(Email), nameof(Phone), nameof(MobilePhone) });
} }
// Validate each address in comma-separated email fields // Validate each address in comma-separated email fields
@@ -59,7 +59,7 @@
</h5> </h5>
<div class="alert alert-info alert-permanent py-2 px-3 mb-3" style="font-size:.875rem;"> <div class="alert alert-info alert-permanent py-2 px-3 mb-3" style="font-size:.875rem;">
<i class="bi bi-info-circle me-1"></i> <i class="bi bi-info-circle me-1"></i>
<strong>Required:</strong> At least one of Company Name, First Name, or Last Name — and at least one of Email or Phone. <strong>Required:</strong> At least one of Company Name, First Name, or Last Name — and at least one of Email, Phone, or Mobile Phone.
</div> </div>
<div class="row g-3"> <div class="row g-3">
<div class="col-md-6"> <div class="col-md-6">
@@ -24,7 +24,7 @@
<span class="me-2">Showing @Model.StartIndex-@Model.EndIndex of @Model.TotalCount results</span> <span class="me-2">Showing @Model.StartIndex-@Model.EndIndex of @Model.TotalCount results</span>
<span class="me-2">|</span> <span class="me-2">|</span>
<label class="me-2 mb-0">Page size:</label> <label class="me-2 mb-0">Page size:</label>
<select class="form-select form-select-sm w-auto" onchange="changePageSize(this.value)"> <select class="form-select form-select-sm w-auto" style="min-width: 5rem;" onchange="changePageSize(this.value)">
<option value="10" selected="@(Model.PageSize == 10)">10</option> <option value="10" selected="@(Model.PageSize == 10)">10</option>
<option value="25" selected="@(Model.PageSize == 25)">25</option> <option value="25" selected="@(Model.PageSize == 25)">25</option>
<option value="50" selected="@(Model.PageSize == 50)">50</option> <option value="50" selected="@(Model.PageSize == 50)">50</option>