Class RegisterFormValidationRuleAttribute
Registers a form component validation rule to Form builder.
[Obsolete("This API is only available for legacy Form Builder components that provide backward compatibility when transitioning from older versions. The API will be removed when support for the Form Builder compatibility mode is dropped. Update your components to the new validation rules framework. See RegisterFormBuilderValidationRuleAttribute.")]
public sealed class RegisterFormValidationRuleAttribute : RegisterComponentAttribute, IPreInitAttribute
- Inheritance
-
objectAttributeRegisterFormValidationRuleAttribute
- Implements
- Inherited Members
- Extension Methods
Constructors
RegisterFormValidationRuleAttribute(string, Type, string)
Initializes a new instance of the RegisterFormValidationRuleAttribute class.
public RegisterFormValidationRuleAttribute(string identifier, Type validationRuleType, string name)
Parameters
identifierstringUnique identifier of the form component validation rule.
validationRuleTypeTypeType of the form component validation rule. The validation rule must inherit the ValidationRule class.
namestringName of the form component validation rule.
Remarks
Make sure to provide a unique identifier for the form component validation rule from the start. This identifier is used within the form configuration of components and any further change can lead to incorrect configuration load. Consider specifying identifier in format 'CompanyName.ModuleName.ValidationRule', e.g. 'Kentico.Content.RegularExpressionValidationRule'.
Properties
Description
Description of the registered validation rule.
public string Description { get; set; }
Property Value
- string
Methods
PreInit()
Registers the validation rule during application pre-initialization.
public override void PreInit()