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:
@@ -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
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
</h5>
|
||||
<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>
|
||||
<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 class="row g-3">
|
||||
<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">|</span>
|
||||
<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="25" selected="@(Model.PageSize == 25)">25</option>
|
||||
<option value="50" selected="@(Model.PageSize == 50)">50</option>
|
||||
|
||||
Reference in New Issue
Block a user