Table of Contents

Interface IValidationRuleActivator

Namespace
Kentico.Forms.Web.Mvc
Assembly
Kentico.Content.Web.Mvc.dll

Defines methods for creating ValidationRules.

public interface IValidationRuleActivator
Extension Methods

Methods

CreateValidationRule(ValidationRuleDefinition)

Creates a new instance of the ValidationRule specified by its definition with default property values.

ValidationRule CreateValidationRule(ValidationRuleDefinition definition)

Parameters

definition ValidationRuleDefinition

Defines ValidationRule which is to be created.

Returns

ValidationRule

Returns an instance of ValidationRule as described by its definition.

Exceptions

ArgumentNullException

Thrown when definition is null.

CreateValidationRule(string)

Creates a new instance of the ValidationRule specified by its definition with default property values.

ValidationRule CreateValidationRule(string validationRuleIdentifier)

Parameters

validationRuleIdentifier string

Identifies ValidationRule which is to be created.

Returns

ValidationRule

Returns an instance of ValidationRule as described by its definition.

Exceptions

ArgumentNullException

Thrown when validationRuleIdentifier is null or empty.

InvalidOperationException

Thrown when ValidationRule with given validationRuleIdentifier is not registered in the system.