ClientValidationRule.WithParameter(String, Object) Method

Definition

Adds or replaces a parameter on the rule.

public Microsoft.AspNetCore.Components.Forms.ClientValidation.ClientValidationRule WithParameter(string name, object? value);
member this.WithParameter : string * obj -> Microsoft.AspNetCore.Components.Forms.ClientValidation.ClientValidationRule
Public Function WithParameter (name As String, value As Object) As ClientValidationRule

Parameters

name
String

The parameter name. Must be non-empty.

value
Object

The parameter value. Must be JSON-primitive-shaped (string, bool, numeric primitives, or null).

Returns

The same rule, to allow fluent chaining.

Applies to