Check Value with Custom Rule

You can implement a custom rule attribute by inheriting from the RulePropertyValue<TPropertyValue> class. Here, such a rule is created to check the length of the specified string property. The rule is applied using a specially designed custom rule attribute in code or in the Application Model. The following properties are checked:
- MoreThan5Symbols must consist of more than five symbols;
- NotMoreThanTenSymbols value length must not exceed 10;
This rule is checked when saving an object.
Name AscendingNot filtered
More Than 5 Symbols Not filtered
Not More Than Ten Symbols Not filtered
EditInvalid CustomRuleObjectShortThis string is too long
EditValid CustomRuleObjectNow the length is enough to pass the rule10 symbols
Page 1 of 1 (2 items)Prev1Next v