Validate select box

后端 未结 8 658
广开言路
广开言路 2020-12-08 01:44

I\'m using the jQuery plugin Validation to validate a form. I have a select list looking like this:

   

  • Instead of working with the attribute value="default" in the tag option, disable the default option as suggested by Jeremy Visser or set value=""

    or

  • Set the plugin validation rule

    $( "#YOUR_FORM_ID" ).validate({ rules: { myselect: { required: true } } });

    or

  • 提交评论

    提交回复
    热议问题