The following example is the simplest way to validate a textfield. In this case we have a textfield and the only characters allowed are:

[0123456789QWERTYUIOPLKJHGFDSAZXCVBNMqwertyuioplkjhgfdsazxcvbnm ];

I think in any application with user input you will need some sort of validation :)

You can grab the code TextFormatter