Skip to content

ValidateRangeAttribute class

namespace: Serenity.ComponentModel   assembly: Serenity.Net.Core

Requires a value to be between a minimum and a maximum, both included, which the forms also check. The limits are parsed, and a value given as text is converted, in the invariant culture. An empty value is valid, as being required is RequiredAttribute's concern.

[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter)]
public class ValidateRangeAttribute : RangeAttribute, IClientValidationRule, IHasTextKey

Public Members

name description
ValidateRangeAttribute(…) Creates a range of integers. (3 constructors)
Rule { get; }
RuleParams { get; }
Side { get; set; }
TextKey { get; set; }
const Key The type key of the class of the rule on the client side, i.e. Serenity.RangeValidationRule.

Protected Members

name description
override IsValid(…)

See Also