Files
monorepo/LCU.API.Collections.RepoApi-old/LCU.API.Collections.RepoApi/Models/Requests/AccountQueueRequest.cs
T
2026-04-20 14:47:24 -05:00

29 lines
947 B
C#

using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace LCU.API.Collections.RepoApi.Models.Requests
{
public class AccountQueueRequest : IValidatableObject
{
[Required]
[StringLength(16, MinimumLength = 7,
ErrorMessage = "The AccountNo field must have a length between 7 and 16 characters")]
public string AccountNo { get; set; }
[StringLength(20, MinimumLength = 1)] public string CaseId { get; set; }
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
{
var results = new List<ValidationResult>();
if (string.IsNullOrWhiteSpace(AccountNo))
{
results.Add(new ValidationResult(
"AccountNo (AccountIdentifier) is not valid",
new[] { nameof(AccountNo) }));
}
return results;
}
}
}