Click or drag to resize
ValidationRuleDefinition Constructor
Initializes a new instance of the ValidationRuleDefinition class using given identifier, form component validation rule type and name.

Namespace: Kentico.Forms.Web.Mvc
Assembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 12.0.0
Syntax
C#
public ValidationRuleDefinition(
	string identifier,
	Type validationRuleType,
	string name
)

Parameters

identifier
Type: SystemString
Unique identifier of the form component validation rule.
validationRuleType
Type: SystemType
Type of the form component validation rule.
name
Type: SystemString
Name of the form component validation rule.
Exceptions
ExceptionCondition
ArgumentException

Specified identifier is null, an empty string or identifier does not specify a valid code name.

-or-

Specified validationRuleType does not inherit ValidationRule, is an abstract type or is a generic type which is not constructed.

-or-

Specified name is null or an empty string.

ArgumentNullExceptionThrown when validationRuleType is null.
See Also