ValidateScriptAttribute.ErrorMessage ValidateScriptAttribute.ErrorMessage ValidateScriptAttribute.ErrorMessage Property

Definition

Gets or sets the custom error message that is displayed to the user.

The item being validated and the validating scriptblock is passed as the first and second formatting argument.

[ValidateScript("$_ % 2", ErrorMessage = "The item '{0}' did not pass validation of script '{1}'")]
public string ErrorMessage { get; set; }
member this.ErrorMessage : string with get, set
Public Property ErrorMessage As String
Property Value

Applies to