zeroframework/Services/DeviceCenter/ZeroFramework.DeviceCenter.Application/Validations/ResourceGroups/ResourceGroupUpdateRequestModelValidator.cs

15 lines
501 B
C#
Raw Normal View History

2023-12-05 09:22:48 +00:00
using FluentValidation;
using ZeroFramework.DeviceCenter.Application.Models.ResourceGroups;
namespace ZeroFramework.DeviceCenter.Application.Validations.ResourceGroups
{
public class ResourceGroupUpdateRequestModelValidator : AbstractValidator<ResourceGroupUpdateRequestModel>
{
public ResourceGroupUpdateRequestModelValidator()
{
RuleFor(m => m.Name).NotNull().NotEmpty().Length(5, 20);
RuleFor(m => m.DisplayName).Length(5, 20);
}
}
}