Skip to content

IClientValidationRule interface

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

A validation attribute that the forms also check, by the client side rule class whose type key is its rule, e.g. Range for Serenity.RangeValidationRule, with the minimum and the maximum as its parameters. The Validate attributes, like ValidateRangeAttribute, and the ones deriving from ValidationRuleAttribute implement it.

public interface IClientValidationRule

Members

name description
Rule { get; } Gets the type key of the class of the rule on the client side, which can be short like the keys of the editors, e.g. Range for Serenity.RangeValidationRule.
RuleParams { get; } Gets the parameters of the rule on the client side, which are serialized to JSON, or null when it has none.
Side { get; } Gets where the rule is checked: by the forms and on the server, which is the default, or only on one of them.

See Also