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.
26 lines
1.0 KiB
26 lines
1.0 KiB
3 years ago
|
using FluentValidation;
|
||
|
|
||
|
namespace Win_in.Sfs.Scp.WebApi;
|
||
|
|
||
|
public class CreatePartDtoValidator : AbstractValidator<PartDTO>
|
||
|
{
|
||
|
public CreatePartDtoValidator()
|
||
|
{
|
||
|
RuleFor(x => x.Code).MaximumLength(64).NotEmpty();
|
||
|
RuleFor(x => x.Name).MaximumLength(64).NotEmpty();
|
||
|
RuleFor(x => x.Desc1).MaximumLength(1024);
|
||
|
RuleFor(x => x.Desc2).MaximumLength(1024);
|
||
|
RuleFor(x => x.Status).MaximumLength(64).NotEmpty();
|
||
|
RuleFor(x => x.IsMakePart).NotEmpty();
|
||
|
RuleFor(x => x.IsBuyPart).NotEmpty();
|
||
|
RuleFor(x => x.Uom).MaximumLength(64).NotEmpty();
|
||
|
RuleFor(x => x.AbcClass).MaximumLength(64).NotEmpty();
|
||
|
RuleFor(x => x.ProductLine).MaximumLength(64);
|
||
|
RuleFor(x => x.Type).MaximumLength(64);
|
||
|
RuleFor(x => x.Catalog).MaximumLength(64);
|
||
|
RuleFor(x => x.Group).MaximumLength(64);
|
||
|
RuleFor(x => x.Version).MaximumLength(64);
|
||
|
RuleFor(x => x.Site).MaximumLength(64).NotEmpty();
|
||
|
RuleFor(x => x.Company).MaximumLength(64).NotEmpty();
|
||
|
}
|
||
|
}
|