ClientValidationRule(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 new rule with the specified name and error message.
public ClientValidationRule(string name, string errorMessage);
new Microsoft.AspNetCore.Components.Forms.ClientValidation.ClientValidationRule : string * string -> Microsoft.AspNetCore.Components.Forms.ClientValidation.ClientValidationRule
Public Sub New (name As String, errorMessage As String)
Parameters
- name
- String
The rule name. Must be non-empty and must match the name recognized by the client-side validator JavaScript.
- errorMessage
- String
The formatted error message displayed when the rule fails. Must not be null;
pass Empty only if an empty message is intentional.