zeroframework/Services/DeviceCenter/ZeroFramework.DeviceCenter.Application/Validations/Devices/DeviceGroupUpdateRequestModelValidator.cs

14 lines
480 B
C#
Raw Normal View History

2023-12-05 09:22:48 +00:00
using FluentValidation;
using ZeroFramework.DeviceCenter.Application.Models.Devices;
namespace ZeroFramework.DeviceCenter.Application.Validations.Devices
{
public class DeviceGroupUpdateRequestModelValidator : AbstractValidator<DeviceGroupUpdateRequestModel>
{
public DeviceGroupUpdateRequestModelValidator()
{
RuleFor(m => m.Name).NotNull().NotEmpty().Length(5, 20);
RuleFor(m => m.Remark).MaximumLength(100);
}
}
}