Forums

alphanum validation does not appear to be working

critter42 15 Jun, 2011
I have a form with the following tag:

<input name="address1" type="text" id="address1" class="validate['alphanum','required']" size="40" maxlength="50" /><div id='error-message-address1'></div>


However I'm getting some spam submissions that is letting a URL be entered into this field. Shouldn't the 'alphanum' validation catch that?
GreyHead 15 Jun, 2011
Hi critter42 ,

Yes and no.

Yes it will prevent that entry if the browser has JavaScript enabled.
No, it won't block a spam bot that doesn't have JavaScript enabled.

If you add a serverside validation check or a block that should stop both kinds of spam.

Bob
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger