ArgumentValidationAttributeGetErrorMessage Method

Gets the error message to display if validation failed.

Definition

Namespace: Ookii.CommandLine.Validation
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
C#
public virtual string GetErrorMessage(
	CommandLineArgument argument,
	Object? value
)

Parameters

argument  CommandLineArgument
The argument that was validated.
value  Object
The argument value. If not , this must be an instance of CommandLineArgumentArgumentType.

Return Value

String
The error message.

Remarks

Override this method in a derived class to provide a custom error message. Otherwise, it will return a generic error message.

See Also