This looks like a case for both client-side and server-side validation. To save time and frustration for your prospective members, you should have js validation to check for errors before the form is sent. Any errors should be noted at the top of the form or on top of /beside the form widget.
Server-side validation (pHp) MUST take place if data is to be passed to DB or even back to HTML. Again, a mechanism should be in place if an error occurs.
This is quite involved and you would do well to get an off-the-shelf js checker (I've used YAV in the past: http://yav.sourceforge.net ). pHp reporting is more straightforward:
if(isset($_SESSION['formerror']['mywidget']))echo$_SESSION['formerror']['mywidget'];
If you're going to produce your own php validation scripts, you'll need to learn aboutregular expressions (regexp). Looks horrendous, but ain't that bad.