You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.2 KiB
29 lines
1.2 KiB
using FluentValidation;
|
|
|
|
namespace Win_in.Sfs.Scp.WebApi;
|
|
|
|
public class ReceiptCreateDtoValidator : AbstractValidator<ReceiptCreateDTO>
|
|
{
|
|
public ReceiptCreateDtoValidator()
|
|
{
|
|
RuleFor(q => q.RcNumber).NotEmpty().MaximumLength(64);
|
|
RuleFor(q => q.AsnNumber).MaximumLength(64);
|
|
RuleFor(q => q.PoNumber).MaximumLength(64);
|
|
RuleFor(q => q.SupplierCode).NotEmpty().MaximumLength(64);
|
|
RuleFor(q => q.RcType).NotNull().MaximumLength(64);
|
|
RuleFor(q => q.Warehouse).MaximumLength(64);
|
|
RuleFor(q => q.Dock).MaximumLength(64);
|
|
RuleFor(q => q.ReceiveDate).NotNull();
|
|
RuleFor(q => q.ReceiveTime);
|
|
RuleFor(q => q.PoLine).MaximumLength(64);
|
|
RuleFor(q => q.PartCode).NotEmpty().MaximumLength(64);
|
|
RuleFor(q => q.Lot).NotNull().MaximumLength(64);
|
|
RuleFor(q => q.SupplierLot).NotNull();
|
|
RuleFor(q => q.Uom).NotNull().MaximumLength(64);
|
|
RuleFor(q => q.ReceiveQty).NotNull();
|
|
RuleFor(q => q.SupplierPackConvertRate).NotNull();
|
|
RuleFor(q => q.Remark).MaximumLength(4096);
|
|
RuleFor(q => q.Site).NotEmpty().MaximumLength(64);
|
|
RuleFor(q => q.Company).NotEmpty().MaximumLength(64);
|
|
}
|
|
}
|