close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

What pattern do I need to jQuery Validate a value less than a particular number?

Thread began 5/23/2014 9:59 am by Nathon Jones Web Design | Last modified 5/30/2014 12:18 am by Nathon Jones Web Design | 5176 views | 26 replies

Nathon Jones Web Design

What pattern do I need to jQuery Validate a value less than a particular number?

I have two options in a drop-down menu with corresponding numeric values on my product detail page:
Dimmable (1)
Non-Dimmable (2)

When the user first opens the product detail page I want the drop down menu to say "Please select". I initially set this to have a blank value and for the jQuery Validation to require a value - so it would fail if the user left if on "Please select". However, I have an onchange function on the page that HAS to have a value in order to carry out a lookup for a product code so that it can display the correct price. So, it occurred to me that since "Non-dimmable" is the default value for any product I could use "2" for the value of the "Please select" option but, of course, the jQuery Validation accepts it as a value.

So, my solution (and please let me know if you think this is nuts!), is to set the value of the Please select option to a 3 and make the jQuery Validation check for a value less than 3.

What pattern do I need to achieve this? I don't see an option, in the list of validations, for "is less than".
Thank you
NJ

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...