2020-05-05 13:13:19 +02:00
|
|
|
using FluentValidation;
|
|
|
|
|
using zero.Core.Entities;
|
|
|
|
|
using zero.Core.Entities.Setup;
|
|
|
|
|
using zero.Core.Extensions;
|
|
|
|
|
|
|
|
|
|
namespace zero.Core.Validation
|
|
|
|
|
{
|
|
|
|
|
public class ApplicationValidator : AbstractValidator<Application>
|
|
|
|
|
{
|
|
|
|
|
public ApplicationValidator()
|
|
|
|
|
{
|
|
|
|
|
//RuleFor(x => x.Code).Length(2);
|
2020-06-23 16:08:26 +02:00
|
|
|
RuleFor(x => x.Name).NotEmpty().Length(2, 120);
|
|
|
|
|
RuleFor(x => x.Domains).NotEmpty();
|
2020-05-05 13:13:19 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|