mirror of
https://github.com/MAKS-IT-COM/maksit-certs-ui.git
synced 2025-12-31 04:00:03 +01:00
19 lines
598 B
C#
19 lines
598 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace MaksIT.Models.LetsEncryptServer.Cache.Requests {
|
|
public class PostContactsRequest : 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) });
|
|
}
|
|
}
|
|
} |