This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I would like to know if it's possible to validate only the Parent object so that the Error message that's displayed does not contain the child error message. When the parent is not valid I don't want to see the child validation messages as well. |
|
|
It's not directly possible, but you can filter out the child error messages using the ValidationError.AssociatedEntity property. E.g.: public static IEnumerable<ValidationError> LocalErrors(this Entity entity) { |
|
|
Thank you will use this. |
|