PDA

View Full Version : Can I code to prevent field input?


vics
06-10-2011, 03:43 PM
Gang;

As we get a lage amount of spammers per week of your typical varietal (see attached), and no, we're not going to upgrade our registration system just yet, can I prevent via field code, the numeric string '123456' in our 'Real Name' field?

This would reject the registration attempt.

If so, where is this done and what might it be?
I'd apprecaite the exact code string...

Any help appreciated - PM me if you can do it as a 'pay gig' as well.

Thanks

Lynne
06-10-2011, 03:59 PM
In the user profile field manager, edit the profile field and put something in the regex field like:
^((?!1234).)*$

That doesn't allow any usernames that start with "1234"

http://www.php.net/manual-lookup.php?function=preg-match

vics
06-10-2011, 06:17 PM
In the user profile field manager, edit the profile field and put something in the regex field like:
^((?!1234).)*$That doesn't allow any usernames that start with "1234"

http://www.php.net/manual-lookup.php?function=preg-match

Nice - worked perfectly - thanks very much!
Vic