In the interim, you might want to look at
With this, you can avoid rolling your own validation framework. It’s based not on regular expressions, but on simple, everyday functions, with a “whiteboard” metaphor, mirroring how you yourself might do the job.
Use the functions already there, to do much of the gruntwork. Where an existing function won’t do, write others as needed, and plug 'em in, in sequence.
The sample project was accidentally dropped, but it was added back in (with a new link) a little while ago.