schema extensions
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user