Thread Starter
wdolby
(@mdolbear)
Thanks for the speedy response t-p! I did search the forum first! I shall wait in eager anticipation..
Following. I have the same issue.
Someone posted this useful bit of code that solves the problem:
<script type=”text/javascript”>
jQuery(document).ready(function() {
jQuery(‘input[name=”submit”]’).bind(‘click’, function() {
var nameLength = jQuery(‘input[name=”sml_name”]’).val().length;
if (nameLength < 3) {
alert (“Please enter at least 3 letters for name”);
return false;
}
var pattern=/(^[a-zA-Z_.+-]+)@([a-zA-Z_-]+).([a-zA-Z]{2,4}$)/i;
var email = jQuery(‘input[name=”sml_email”]’).val();
if (pattern.test(email))
return true;
else {
alert (“Please enter a valid email address”);
return false;
}
});
});
</script>
I just stuck it in a div at the end of the page where my register form is, works a treat!