All these cases can be performed using regular expressions, or short regexps, or even shorter REs.
Qt validating user input 100 free adult mobile chat dating site za
Before I delve any further into the subject there are a few things that I need to bring up.
First, there are several RE dialects, they all work in pretty much the same way, but some details may differ. Second, REs can be used in many contexts, for example splitting input into nice chunks. Third, and last, this chapter will just cover the very basic and scratch the surface.
For example, preventing a user from entering letters into a text field that expects a number makes it clearer what is needed.
In addition to this the colour of the text field can be changed to provide the user with a visual feedback, e.g.
Abstract Input data generally needs to be screened, or validated, to make sure that it is appropriate.