Spry Validation with no spaces in Dreamweaver CS5

Hi all,
I have a site in which I have a user setup form. I have a UserID Spry Validation Text Field that I need to have locked so it does not accept spaces. It needs to accept only Alphanumeric characters. I keep playing with the patterns but I can't figure out how to make a pattern accept a min / max value. I am using Dreamweaver CS5. Any ideas?

Thanks.
Jon
LVL 3
Jon DeVitoAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Jason C. LevineConnect With a Mentor No oneCommented:
Hi Jon,

You can't really do this with Spry because once you specify a custom pattern you sort of lose the ability to deal with min and max chars.  There's a REALLY long and complex way to make Spry do it, but your best bet is to just use a simpler Javascript function to remove the spaces automatically:

http://www.mediacollege.com/internet/javascript/form/remove-spaces.html

0
 
Jon DeVitoAuthor Commented:
Hi Jason. This looks exactly like what I need. I'm away until late tonight so I'll let you know by tomorrow if this works for me. Thanks so much!

Jon
0
 
Jon DeVitoAuthor Commented:
Works perfectly, thanks so much!
0
All Courses

From novice to tech pro — start learning today.