Added validation to admin pages

This commit is contained in:
2024-10-27 15:26:25 +01:00
parent 85a45ece55
commit d38cce6dc2
8 changed files with 66 additions and 16 deletions

View File

@@ -11,11 +11,12 @@ public interface IAdminPropertyGenerator<TProperty> {
IAdminPropertyGenerator<TProperty> Ignore(bool ignore = true);
IAdminPropertyGenerator<TProperty> Generated(bool generated = true);
IAdminPropertyGenerator<TProperty> Bold(bool bold = true);
IAdminPropertyGenerator<TProperty> Unique(bool unique = true);
IAdminPropertyGenerator<TProperty> DisplayName(string displayName);
IAdminPropertyGenerator<TProperty> Description(string description);
IAdminPropertyGenerator<TProperty> Prefix(string prefix);
IAdminPropertyGenerator<TProperty> Validator(Func<object, bool> validator);
IAdminPropertyGenerator<TProperty> Validator(Func<TProperty, string> validator);
IAdminPropertyGenerator<TProperty> IsSelector<TSelector>();
IAdminPropertyGenerator<TProperty> Parser<TModel>(Func<TModel, string, TProperty> parser);
IAdminPropertyGenerator<TProperty> ParserForListType<TModel, TInnerProperty>(Func<TModel, string, TInnerProperty> parser);