Zend_Form validator custom error message in INI configuration file

被刻印的时光 ゝ 提交于 2019-12-08 09:01:27

I think you need to select which specific validation message you want to override.

Try this:

form.elements.attribute_name.options.validators.strlen.options.messages.stringLengthInvalid = "You Muppet!"
form.elements.attribute_name.options.validators.strlen.options.messages.stringLengthTooShort = "You Muppet!"
form.elements.attribute_name.options.validators.strlen.options.messages.stringLengthTooLong = "You Muppet!"

Of course, I could be wrong!

Bingo! Thanks to Rob Allen's post I've managed to figure it out. The correct INI code is:

form.elements.attribute_page.options.validators.strlen.options.messages.stringLengthTooLong = "You Muppet!"

Thanks Rob!

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