• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 782
  • Last Modified:

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
0
Jon DeVito
Asked:
Jon DeVito
  • 2
1 Solution
 
Jason C. LevineNo 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now