ClientValidationRule(String, IReadOnlyDictionary<String,String>) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a rule with the specified name and optional parameters.
public ClientValidationRule(string name, System.Collections.Generic.IReadOnlyDictionary<string,string>? parameters = default);
new Microsoft.AspNetCore.Components.Forms.ClientValidationRule : string * System.Collections.Generic.IReadOnlyDictionary<string, string> -> Microsoft.AspNetCore.Components.Forms.ClientValidationRule
Public Sub New (name As String, Optional parameters As IReadOnlyDictionary(Of String, String) = Nothing)
Parameters
- name
- String
The rule name. Must be non-empty and must match the name registered with the JS
validator via Blazor.formValidation.addValidator(name, ...).
- parameters
- IReadOnlyDictionary<String,String>
Optional parameters passed to the JS validator at runtime. All values are strings on the
wire; validators that need numeric or boolean values parse them at validation time
(parseInt, parseFloat, etc.). When null or empty, the
params object is omitted from the wire format.