2020-05-22 21:19:49 +02:00
|
|
|
using FluentValidation;
|
|
|
|
|
using zero.Core.Attributes;
|
|
|
|
|
using zero.Core.Entities;
|
|
|
|
|
using zero.Core.Validation;
|
2020-05-22 15:06:17 +02:00
|
|
|
|
|
|
|
|
namespace zero.Debug
|
|
|
|
|
{
|
2020-05-22 21:19:49 +02:00
|
|
|
[Collection("Applications")]
|
2020-05-22 15:06:17 +02:00
|
|
|
public class MyApplication : Application
|
|
|
|
|
{
|
|
|
|
|
public string Description { get; set; }
|
|
|
|
|
}
|
2020-05-22 21:19:49 +02:00
|
|
|
|
|
|
|
|
public class MyApplicationValidator : AbstractValidator<MyApplication>
|
|
|
|
|
{
|
|
|
|
|
public MyApplicationValidator()
|
|
|
|
|
{
|
|
|
|
|
Include(new ApplicationValidator());
|
|
|
|
|
|
2020-05-24 14:39:49 +02:00
|
|
|
//RuleFor(x => x.Description).NotEmpty();
|
2020-05-22 21:19:49 +02:00
|
|
|
}
|
|
|
|
|
}
|
2020-05-22 15:06:17 +02:00
|
|
|
}
|