Class RegisterFormValidationRuleAttribute
Registers a form validation rule.
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
public sealed class RegisterFormValidationRuleAttribute : Attribute
- Inheritance
-
objectAttributeRegisterFormValidationRuleAttribute
- Extension Methods
Remarks
Use attribute to register validation rule to the system. It is not mandatory to register validation rule. Form component implementation can instantiate specific rule itself and call AddValidationRule(IValidationRule) method. Registered rule will be available for class fields depending on generic type and field data type.
Constructors
RegisterFormValidationRuleAttribute(string, Type, string, string)
Initializes a new instance of the RegisterFormValidationRuleAttribute class.
public RegisterFormValidationRuleAttribute(string identifier, Type ruleType, string name, string description = null)
Parameters
identifierstringUnique identifier of the validation rule.
ruleTypeTypeType implementing the validation rule.
namestringName of the validation rule.
descriptionstringDescription of the validation rule.
Properties
Description
Description of the validation rule.
public string Description { get; }
Property Value
- string
Identifier
Unique identifier of the validation rule.
public string Identifier { get; }
Property Value
- string
MarkedType
Type implementing the validation rule.
public Type MarkedType { get; }
Property Value
- Type
Name
Name of the validation rule.
public string Name { get; }
Property Value
- string