简体   繁体   中英

jQuery plugin Validation conditional rule

Using jQuery plugin: Validation

If base_select option class one and is selected and sss_select option class yyy ais selected there should be warning like "can't select one and yyy"

<select id="base_select">
    <option class="one">one</option>
    <option class="two">two</option>
</select>

<select id='sss_select'>
    <option class="xxx">xxx</option>
    <option class="yyy">yyy</option>
</select>

check jquery documentation on required( dependency-expression )

http://docs.jquery.com/Plugins/Validation/Methods/required

or check below SO link

https://stackoverflow.com/q/1084537/287100

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM