How to make select2 work with jquery.validation plugin?

后端 未结 15 621
北荒
北荒 2020-12-01 02:40

I\'m trying to validate select2 field using jquey.validation plugin but nothing happens.

I want to make select required field.

I\'m using this custom validat

15条回答
  •  自闭症患者
    2020-12-01 03:27

    According to the error placement logic of jQuery validator, you may use the markup like below.

    It will place the error block below the select2 box and make the error block visible.

提交回复
热议问题