Click or drag to resize
CompareToFieldValidationRuleTValue Class
Inherit this class to implement validation rule which needs value of another field in order to function.
Inheritance Hierarchy
SystemObject
  Kentico.Forms.Web.MvcValidationRule
    Kentico.Forms.Web.MvcValidationRuleTValue
      Kentico.Forms.Web.MvcCompareToFieldValidationRuleTValue
        Kentico.Forms.Web.MvcNumericCompareToFieldValidationRuleTValue
        Kentico.Forms.Web.MvcStringCompareToFieldValidationRule

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 CompareToFieldValidationRule<TValue> : ValidationRule<TValue>

Type Parameters

TValue
Type of the compared values.

The CompareToFieldValidationRuleTValue type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyDependeeFieldGuid
GUID of the field validated against.
Public propertyDependeeFieldValue
Gets strongly typed value of the field validated against.
Public propertyErrorMessage
Gets or sets the error message to be shown when the form component's value is invalid.
(Inherited from ValidationRule.)
Public propertyInstanceIdentifier
Gets or sets identifier of the validation rule instance.
(Inherited from ValidationRule.)
Public propertyTitle
Gets a title for this instance of validation rule.
(Inherited from ValidationRule.)
Top
Methods
  NameDescription
Public methodGetTitle
Gets a title for this instance of validation rule such as 'Maximum length is 100'.
(Inherited from ValidationRule.)
Public methodIsValueValid
Validates the form component's value and returns true if the value is valid. This method is used by system.
(Inherited from ValidationRuleTValue.)
Public methodModifyMetadata
Modifies modelMetadata according to the current object.
(Inherited from ValidationRule.)
Protected methodValidate
Wrapped by IsValueValid(Object) which converts the value to type specified by the generic type. Override this method to apply desired validation.
(Inherited from ValidationRuleTValue.)
Top
See Also