Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

regex dropdown list

Status
Not open for further replies.

Hfnet

IS-IT--Management
Dec 31, 2003
369
GB
Hello,

Apologies if this is the wrong forum, but I have an issue using the jquery validator at
It works great except for dropdown lists in Firefox. if I tab through a web form in IE and do not enter any values, it will show the error but in Firefox it does not.

The dropdowns have --- Please Select --- visible and basically I need to check that a value is entered in the dropdowns. Currently it checks by regex:

"Choose":{
"regex":"/^[0-9a-zA-Z /\~|()-]+$/",
"alertText":"* Please make a selection"}

What I really need is to just check that the value is NOT "--- Please Select ---"

Can anyone offer any advice please?
 
Hi

Hfnet said:
The dropdowns have --- Please Select --- visible
[gray](...)[/gray]
What I really need is to just check that the value is NOT "--- Please Select ---"
So the "Please Select" is the text, the value or both ? Would be easier to understand if you post the related HTML too.

However for now I see no sign of AJAX. That looks like plain forum216.

By the way, if you intend to allow backslash ( \ ), note that it is a metacharacter used for escaping other metacharacters. so you have to escape it : [tt]/^[0-9a-zA-Z /[highlight]\[/highlight]\~|()-]+$/[/tt] .

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top