Validator.GetMessage Method
Gets the message representing a failed validation.
Namespace: Microsoft.Practices.EnterpriseLibrary.Validation
Assembly: Microsoft.Practices.EnterpriseLibrary.Validation (in Microsoft.Practices.EnterpriseLibrary.Validation.dll)
Syntax
'Declaration
Protected Friend Overridable Function GetMessage ( _
objectToValidate As Object, _
key As String _
) As String
protected internal virtual string GetMessage(
Object objectToValidate,
string key
)
protected public:
virtual String^ GetMessage(
Object^ objectToValidate,
String^ key
)
protected internal function GetMessage(
objectToValidate : Object,
key : String
) : String
Parameters
- objectToValidate
Type: System.Object
The object for which validation was performed.
- key
Type: System.String
The key representing the value being validated for objectToValidate.
Return Value
The message representing the validation failure.
Remarks
The default validation maessage formatting provides the object to validate, the key and the tag.
Subclasses may provide additional formatting parameters.