Validating in visual basic
While HTML5 form validation is typically about missing or invalid text inputs, there are other form element types that also require attention. Suppose you have a form on your website that at the bottom asks people to "accept the Terms and Conditions" or something similar.
Basically you don't want the form to be submitted unless this is checked.
If the operation succeeds, the method returns true, if it fails (with an invalid date) the failure is trapped in a catch block which in turn returns a false.
There are three functions here: One to check if a string contains only alphabetical characters, another to check if a string contains only alphabetical or numeric characters and a third to check if a string contains numeric characters only.
But a zero length string is also returned if the user simply forgets to enter anything. NET where there are even more sophisticated ideas, the best way to improve this program is to simply get rid of the Input Box and loop. Focus() End Sub It's a minor point, but you might also keep in mind that the VB.