Jquery Validate custom error message location

后端 未结 7 1744
一个人的身影
一个人的身影 2021-01-30 16:35

This looks very simply, but I can\'t figure it out. I\'m using the jquery validate plugin. I\'m trying to validate and

7条回答
  •  再見小時候
    2021-01-30 17:00

    Add this code in your validate method:

     errorLabelContainer: '#errors'
    

    and in your html, put simply this where you want to catch the error:

    All the errors will be held in the div, independently of your input box.

    It worked very fine for me.

提交回复
热议问题