Parsley.js error message

南笙酒味 提交于 2019-12-04 15:52:26

If you look in parsley.js source file, you'll see that there is an errors object config at the bottom of the file that allows you to have control over where you want to put your error messages. Let take a look at it:

// specify where parsley error-success classes are set
errors: {
    classHandler: function ( elem, isRadioOrCheckbox ) {}
  , container: function ( elem, isRadioOrCheckbox ) {}
  , errorsWrapper: '<ul></ul>'
  , errorElem: '<li></li>'
}

errors.classHander is the dom element that would receive parsley-success and parsley-error classes. errors.container is the dom element where would be appended the error element -> basically, it should be here your popover dom element errors.errorsWrapper and errors.errorElem would allow you to customize deeper the error template (by default, ul and lis)

Hope that would help you

Best

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!