Click or drag to resize
ValidationRule Class
Represents a base class for a form component validation rule. Do not inherit this class directly, inherit the ValidationRuleTValue class instead.
Inheritance Hierarchy
SystemObject
  Kentico.Forms.Web.MvcValidationRule
    Kentico.Forms.Web.MvcValidationRuleTValue

Namespace: Kentico.Forms.Web.Mvc
Assembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 13.0.131
Syntax
C#
[SerializableAttribute]
public abstract class ValidationRule : IModelMetadataModifier

The ValidationRule type exposes the following members.

Constructors
  NameDescription
Protected methodValidationRule
Top
Properties
  NameDescription
Public propertyErrorMessage
Gets or sets the error message to be shown when the form component's value is invalid.
Public propertyInstanceIdentifier
Gets or sets identifier of the validation rule instance.
Public propertyTitle
Gets a title for this instance of validation rule.
Top
Methods
  NameDescription
Public methodGetTitle
Gets a title for this instance of validation rule such as 'Maximum length is 100'.
Public methodIsValueValid
Validates the form component's value and returns true if the value is valid.
Public methodModifyMetadata
Modifies modelMetadata according to the current object.
Top
See Also