Lennart Ericson
asked on
How to avoid evil-minded form replies
I have got a from where people can apply for membership in a club. Everyday I receive applications from sort of evil-minded people like
first name: WcrLMrJnxLwOl
family name: pJFxPjSDRprMN
address: TJnxLowhiGDdwZiywPr
The responses don't make sense, not even in my native language.
Is there a way to filter so only seemingly sensible replies go through? Sensible values are western European names.
I have tried jQuery validator:
Please help!
first name: WcrLMrJnxLwOl
family name: pJFxPjSDRprMN
address: TJnxLowhiGDdwZiywPr
The responses don't make sense, not even in my native language.
Is there a way to filter so only seemingly sensible replies go through? Sensible values are western European names.
I have tried jQuery validator:
<script>
jQuery.validator.addMethod("lettersonly", function(value, element)
{
return this.optional(element) || /^[A-ZÅÖÄa-zåäö-]+$/i.test(value);
},
"Endast bokstäver");
$().ready(function() {
// validate signup form on keyup and submit
$("#signupForm").validate({
rules: {
fornamn: {required:true,lettersonly:true},
efternamn: {required:true,lettersonly:true},
adress: "required",
postnr: {required:true,number:true},
ort: {required:true,lettersonly:true},
telnr: {required:true,number:true},
mailadress: {required: true,email: true},
stadgar: "required"
},
messages: {
postnr: " <span style=\"color:#800000;\">Ange siffror utan mellanslag</span>",
telnr: " <span style=\"color:#800000;\">Ange siffror utan mellanslag</span>",
mailadress: " <span style=\"color:#800000;\">Glöm inte ange din e-postadress!</span>",
stadgar: " <span style=\"color:#800000;\">Läs stadgarna och godkänn dem</span> "
}
});
});
</script>
but the configuration I use doesn't stop people from sending me garbage.Please help!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad I could help!
FWIW, I am familiar with those types of random submits and have been able to get rid of them using Captcha. A human won't bother typing in small and caps char.
FWIW, I am familiar with those types of random submits and have been able to get rid of them using Captcha. A human won't bother typing in small and caps char.
ASKER
Trust you!
Am working on it.
Am working on it.
ASKER
??
ASKER
Thanks, padas!
ASKER
Thanks for your reply.
No I am not using Captcha. I will.
I'll accept this answer and try captcha. If the garbage is of other oriigin, I'll return.
For now, thanks!