src/Entity/Fluent.Validation/DeviceFluent.cs

(完整代码) 608B

using FluentValidation;

namespace YL.Core.Entity.Fluent.Validation
{
    public class DeviceFluent : AbstractValidator<Wms_device>
    {
        public DeviceFluent()
        {
            RuleFor(x => x.PlatformNo).NotNull().NotEmpty().WithMessage("机台号不能为空").Length(1, 20).WithMessage("机台号长度不能超过20");
            RuleFor(x => x.SerialNo).NotNull().NotEmpty().WithMessage("机身号不能为空").Length(1, 50).WithMessage("机身号长度不能超过50");
            RuleFor(x => x.Remark).MaximumLength(200).WithMessage("备注长度不能超过200");
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。