As Adi has just suggested in answer you need to either be implementing IData Error Info but you also need to be Binding to a dependency property or using INotify Property Changed on the class that is being bound to in your XAML already sets a handler for the error event on the window level, however, to a method which isn't defined in your code behind fragment.
Your Add Handler call looks ok, but, depending on where it is in the constructor, it might get overridden by the XAML event handler definition.
In your code, define your specifications in properties setters and throw exceptions when ever it doesn't compliance to your specifications.
By binding direct to your DB then you aren't raising the property change events.
You can see that the Name property I suggested in my answer does raise the property changed event @Das Das If you aren't raising property change events (INotify Property Changed or through a Dependency Property) then the UI won't receive updates and therefore the event won't be fired because it hasn't received an update to then perform the validation.
This is a dependency property.(Inherited from UIElement.)Gets or sets the identifying name of the element.
The name provides a reference so that code-behind, such as event handler code, can refer to a markup element after it is constructed during processing by a XAML processor.(Inherited from Framework Element.)Positions child elements and determines a size for a UIElement.
Probably not related, but you might want to change Note you will have to load your data from the DB and create a descriptor for each item you want to display in the Data Grid.
The reason behind why you aren't seeing the event being fired: You aren't raising property change events (INotify Property Changed or through a Dependency Property) therefore the UI won't receive updates and the event won't be fired because it hasn't received an update to then perform the validation.
What to do that event will not fire when i click on Combo Box? And i want to use Validating event for this control. Validating this means that will work for Tet Box which is ok.
Gets or sets a value indicating whether to clip the content of this element (or content coming from the child elements of this element) to fit into the size of the containing element.
This is a dependency property.(Inherited from UIElement.)Gets a value that indicates whether this element has been initialized, either during processing by a XAML processor, or by explicitly having its End Init method called.
(Inherited from Framework Element.)Gets a value that indicates whether the position of the mouse pointer corresponds to hit test results, which take element compositing into account.
but still the text box has a red colour border at the form load.