i am not an expert in rexexp but what i can suggest you is to use javascript for form validation this will save time to users because they will be informed of error before form submited
thing 56k 🙂
here is your form should look :
<form name=form method=post action="page.php" onsubmit="return validate(this)">
...
and put your verification in a js script
<script language=javascript>
function validate(f)
{
if (f.last_name.value="")
{
alert('error');
return false;
}
return true;
}
</script>