Files
mixtape/zero.Debug/MyApplication.cs
T

24 lines
481 B
C#
Raw Normal View History

2020-05-22 21:19:49 +02:00
using FluentValidation;
using zero.Core.Attributes;
using zero.Core.Entities;
using zero.Core.Validation;
namespace zero.Debug
{
2020-05-22 21:19:49 +02:00
[Collection("Applications")]
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());
RuleFor(x => x.Description).NotEmpty();
}
}
}