Is there an easy way to test for field validation on entering data in a form

I have a Flash MX Form that sends data to a MySQL DB. I want to be able to validate the field type on input. When someone enters a phone number and trys to use a text chr I want it to display an error.

Any ideas on the simplest method of doing this?