protected override void Configure(EntityValidator <Person> validator) { validator.RuleFor(x => x.BirthDate) .NotEmpty(); validator.RuleFor(x => x.Email) .NotEmpty() .MaximumLength(250) .EmailAddress(); validator.RuleFor(x => x.Name) .NotEmpty() .MaximumLength(250); }
protected override void Configure(EntityValidator <Experience> validator) { validator.RuleFor(x => x.CompanyName) .NotEmpty() .MaximumLength(60); validator.RuleFor(x => x.Description) .NotEmpty() .MaximumLength(500); validator.RuleFor(x => x.StartDate) .NotEmpty(); validator.RuleFor(x => x.Title) .NotEmpty() .MaximumLength(500); validator.RuleFor(x => x.EmploymentType) .NotEmpty(); }