Click or drag to resize
ValidationRuleActivatorCreateValidationRule Method (String)
Creates a new instance of the ValidationRule specified by its definition with default property values.

Namespace: Kentico.Forms.Web.Mvc
Assembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 12.0.0
Syntax
C#
public ValidationRule CreateValidationRule(
	string validationRuleIdentifier
)

Parameters

validationRuleIdentifier
Type: SystemString
Identifies ValidationRule which is to be created.

Return Value

Type: ValidationRule
Returns an instance of ValidationRule as described by its definition.

Implements

IValidationRuleActivatorCreateValidationRule(String)
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown when validationRuleIdentifier is null or empty.
InvalidOperationExceptionThrown when ValidationRule with given validationRuleIdentifier is not registered in the system.
See Also