【发布时间】:2013-11-24 04:19:00
【问题描述】:
如何显示 modx 寄存器 sn-p 中的所有验证错误?
现在,如果我想在我的表单中显示所有可能的错误,我必须这样做:
[[+error.message:notempty=`[[+error.message]]<br>`]]
[[+error.username:notempty=`[[+error.username]]<br>`]]
[[+error.password:notempty=`[[+error.password]]<br>`]]
[[+error.password_confirm:notempty=`[[+error.password_confirm]]<br>`]]
[[+error.email:notempty=`[[+error.email]]<br>`]]
[[+error.salutation:notempty=`[[+error.salutation]]<br>`]]
[[+error.firstname:notempty=`[[+error.firstname]]<br>`]]
[[+error.lastname:notempty=`[[+error.lastname]]<br>`]]
[[+error.institution:notempty=`[[+error.institution]]<br>`]]
[[+error.excountry:notempty=`[[+error.excountry]]<br>`]]
[[+error.province:notempty=`[[+error.province]]<br>`]]
[[+error.provinceother:notempty=`[[+error.provinceother]]<br>`]]
[[+error.excity:notempty=`[[+error.excity]]<br>`]]
[[+error.oncologist-database:notempty=`[[+error.oncologist-database]]<br>`]]
有谁知道是否有一个占位符可以转储所有错误?
【问题讨论】:
-
您的问题实际上帮助我解决了同样的问题。我不知道为什么错误消息没有全部输入到 error.message 占位符中,但个别错误消息对我来说非常有效。谢谢!
标签: modx modx-revolution