dev_ven
asked on
How can you clear all Validation Errors?
I have several properties that require some validation on my Silverlight application.
I also have a reset button that I would like the user to click and clear all validation errors.
What's the best approach?
The following shows a simple property that gets validated:
I also have a reset button that I would like the user to click and clear all validation errors.
What's the best approach?
The following shows a simple property that gets validated:
<Display(Name:="Title")> _
<Required(ErrorMessage:="The Title field is required.")> _
Public Property Title() As String
Get
Return siteTitle
End Get
Set(ByVal Value As String)
'If String.IsNullOrEmpty(Value) = True Then
' Throw (New Exception("The Title field is require."))
'End If
Validator.ValidateProperty(Value, New ValidationContext(Me, Nothing, Nothing) With {.MemberName = "Title"})
siteTitle = Value
End Set
End Property
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER