mirror of
https://github.com/bitwarden/server
synced 2026-01-09 12:03:21 +00:00
18 lines
511 B
C#
18 lines
511 B
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace Bit.Api.AdminConsole.Models.Request.Organizations;
|
|
|
|
public class OrganizationSeatRequestModel : IValidatableObject
|
|
{
|
|
[Required]
|
|
public int? SeatAdjustment { get; set; }
|
|
|
|
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
|
{
|
|
if (SeatAdjustment == 0)
|
|
{
|
|
yield return new ValidationResult("Seat adjustment cannot be 0.", new string[] { nameof(SeatAdjustment) });
|
|
}
|
|
}
|
|
}
|