It is the default validation applied to a dependency property. Whenever the property value is set, the WPF runtime checks its value using this. If this is a valid value then this method should return true otherwise it should return false.

How to specify ValidateValueCallBack?
This is specified at the same time when we are registering the property with WPF runtime. It is one of the parameter of Register static method in DependencyProperty class.

What actually happens at the background?
When the dependency property is set with a value which has decided to be an invalid value in the ValidateValueCallback then it returns false. Whenever WPF runtime finds it false it results in an exception. If ValidatesOnException is set as true when the control's property is bound then the control is set with Error template.

Simple Example:
Let us create a small WPF window as follows:

As you can see that we have bound Text property of textBox1 text box with Name property of data context. The other thing worth noticing is setting ValidatesOnExceptions as true.

Now have a look at the code behind of this window. In the constructor, we are setting Window2ViewModel as the data context.

The definition of Window2ViewModel is as follows:

So we have a dependency property, named Name in the view model. While registering this property we have specified the ValidateValueCallback method as isNameValid method. You can notice that as the dependency property isNameValid is also static in nature. We are checking the value being set for having some special character. If it contains some invalid character then it returns false. As we discussed above if binding is set with ValidatesOnException as true then the user is shown with error template on the control. In our case, if we enter any special character in the text box, it is displayed as follows: This technique for validation is specially useful when the user interface has no idea about any validation logic. The validation is the responsibility of whatever is set as data context (in this case view model). As you might have notice when we change the validation logic, we just change it in the Window2ViewModel. This is specially useful when the data context is available in the form of libraries. The data context library providers can make sure that no invalid value is set in any property.
Posted by Muhammad Shujaat Siddiqi at 1:51 PM Excellent article on dependency properties,so powerful

July 29, 2011 at 9:36 AM great job,
almost nobody on web had a answer on how to handle the exception when ValidateValueCallback returns false. You explained it. Thanks.

Love from India.
[null, {"document_url": "http://www.shujaat.net/2010/07/wpf-validation-validatevaluecallback.html", "unformatted_src": "http://4.bp.blogspot.com/_fVxKMZVpfzU/TEJJbojR1cI/AAAAAAAAAP8/SABgEFiRcx0/s320/2.JPG", "src": "http://4.bp.blogspot.com/_fVxKMZVpfzU/TEJJbojR1cI/AAAAAAAAAP8/SABgEFiRcx0/s320/2.JPG"}, null, null, null, null, null, {"document_url": "http://www.shujaat.net/2010/07/wpf-validation-validatevaluecallback.html", "unformatted_src": "http://3.bp.blogspot.com/-StVialkfDd8/UCGhpO3j02I/AAAAAAAABuM/_XHqvYMcULs/s195/MVVMSuvivalGuideCover.png", "src": "http://3.bp.blogspot.com/-StVialkfDd8/UCGhpO3j02I/AAAAAAAABuM/_XHqvYMcULs/s195/MVVMSuvivalGuideCover.png", "formatted_filename": "MVVMSuvivalGuideCover", "rendered_width": 161, "rendered_height": 195}, null, null, null, null, {"document_url": "http://www.shujaat.net/2010/07/wpf-validation-validatevaluecallback.html", "unformatted_src": "http://1.bp.blogspot.com/-AM-f-uCY_uU/UbDSwj9c0JI/AAAAAAAAF1Q/0iXTkrmoBZU/s195/VSM.png", "src": "http://1.bp.blogspot.com/-AM-f-uCY_uU/UbDSwj9c0JI/AAAAAAAAF1Q/0iXTkrmoBZU/s195/VSM.png", "formatted_filename": "VSM", "rendered_width": 195, "rendered_height": 54}, null, null, null, null, null]