Class NumericCompareToFieldValidationRule<TValue>
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
-
objectValidationRule<TValue>CompareToFieldValidationRule<TValue>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
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
TValueValue of the field validated against.
Returns
- bool
True if valid, otherwise false.