mirror of
https://github.com/MAKS-IT-COM/maksit-certs-ui.git
synced 2025-12-31 04:00:03 +01:00
16 lines
471 B
C#
16 lines
471 B
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
namespace MaksIT.Models.LetsEncryptServer.Account.Requests {
|
|
public class PutContactsRequest : IValidatableObject {
|
|
|
|
public required string[] Contacts { get; set; }
|
|
|
|
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) {
|
|
|
|
if (Contacts == null || Contacts.Length == 0)
|
|
yield return new ValidationResult("Contacts is required", new[] { nameof(Contacts) });
|
|
}
|
|
}
|
|
}
|