Parsley.js - Displaying Errors in a Specified Element

前端 未结 6 1978
Happy的楠姐
Happy的楠姐 2020-12-30 08:01

Using Parsley.js, is it possible to specify the element that should hold the error messages? I tried:

$(\'#myForm\').parsley({
    errors: {
        containe         


        
6条回答
  •  一向
    一向 (楼主)
    2020-12-30 08:37

    I've added another data-attribute, data-parsley-errors-container="#element". That could allow you modify the DOM to specify where the error messages will be displayed.

    More info here: http://parsleyjs.org/doc/index.html#ui-for-field

    Best

提交回复
热议问题