schema extensions

This commit is contained in:
2022-01-14 11:51:38 +01:00
parent 0f3fe4362a
commit 110d4e6a3d
16 changed files with 200 additions and 138 deletions
+2 -2
View File
@@ -9,8 +9,8 @@ public class CountryStore : EntityStore<Country>, ICountryStore
/// <inheritdoc />
protected override void ValidationRules(ZeroValidator<Country> validator)
{
validator.RuleFor(x => x.Code).Length(2).Unique(Session);
validator.RuleFor(x => x.Name).Length(2, 120);
validator.RuleFor(x => x.Code).NotEmpty().Length(2).Unique(Session);
validator.RuleFor(x => x.Name).NotEmpty().Length(2, 120);
}
}