Click or drag to resize
IValidationRuleActivatorCreateValidationRule Method (ValidationRuleDefinition)
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: 13.0.131
Syntax
C#
ValidationRule CreateValidationRule(
	ValidationRuleDefinition definition
)

Parameters

definition
Type: Kentico.Forms.Web.MvcValidationRuleDefinition
Defines ValidationRule which is to be created.

Return Value

Type: ValidationRule
Returns an instance of ValidationRule as described by its definition.
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown when definition is null.
See Also