Table of Contents

Class NumericCompareToFieldValidationRule<TValue>

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

Shared validation rule implementation used to compare two fields of numeric value types.

public abstract class NumericCompareToFieldValidationRule<TValue> : CompareToFieldValidationRule<TValue> where TValue : IComparable<TValue>

Type Parameters

TValue

Specific type of the compared numeric values.

Inheritance
object
NumericCompareToFieldValidationRule<TValue>
Derived
Inherited Members
Extension Methods

Properties

ComparisonType

Determines which type of comparison is used.

[EditingComponent("Kentico.NumericFieldComparisonTypeSelector", Label = "{$kentico.formbuilder.validationrule.comparetofield.comparisontype.label$}")]
public NumericFieldComparisonTypes ComparisonType { get; set; }

Property Value

NumericFieldComparisonTypes

Methods

GetTitle()

Gets a title for this instance of validation rule.

public override string GetTitle()

Returns

string

Returns text describing the validation rule.

Validate(TValue)

Validates that the values are in specified relationship.

protected override bool Validate(TValue value)

Parameters

value TValue

Value of the field validated against.

Returns

bool

True if valid, otherwise false.