There is a command validatecommand in Entry widget. But there is not a simulated command in Text widget. 
How to implement the function in Text widget in tkinter?
If you want to validate the data when the widget loses focus, you would simply bind a function to the <FocusOut> event.
How to validate the content of a Text widget while this Text widget loses focus?