How to make select2 work with jquery.validation plugin?

后端 未结 15 623
北荒
北荒 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

    In Addition to ABIRAMAN's answer here is some code that

    • Makes the select2 box red when errors appear
    • List the error below the select2 box

    
    

    
    

提交回复
热议问题