In good old MFC, the DDX routines would have built in validation for form entries. For example it was possible to automatically check if the user entered a string in a text box meant for numeric input.
Is there any such mechanism in Winforms? Obviously one can add handlers for the ‘onChange’ etc kind of events and do the processing there, but I am asking if there is any built-in mechanism.
thanks
You could certainly implement your own ValidatingTextBox with a Regex property which is validated, essentially, whenever you decide you want it to be validated (keystrokes, Enter key, loses focus, …)
At the simplest level there are Validated and Validating events on the plain TextBox that you can supply handlers to for individual instances.