ClientValidationRule Class

Definition

Describes a single client-side validation rule produced by an IClientValidationAdapter.

public sealed class ClientValidationRule
type ClientValidationRule = class
Public NotInheritable Class ClientValidationRule
Inheritance
ClientValidationRule

Constructors

Name Description
ClientValidationRule(String, String)

Creates a new rule with the specified name and error message.

Properties

Name Description
ErrorMessage

Gets the formatted error message for this rule. Rendered as the value of data-val-<Name>.

Name

Gets the rule name. Rendered as the suffix of data-val-<Name>.

Parameters

Gets the parameters associated with this rule, keyed by parameter name.

Methods

Name Description
WithParameter(String, Object)

Adds or replaces a parameter on the rule.

Applies to