如何定制/样式代码指示符错误? [英] How do you customize/style codeigniter errors?

查看:140
本文介绍了如何定制/样式代码指示符错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我试图在codeigniter中显示错误消息时自定义CSS / HTML,所以我可以应用一个标签, Google这个搜索手册,但一定是一直在寻找错误的条款 - 任何人可以帮助我吗?

解决方案

  $ this-> form_validation-> set_error_delimiters('< div class =error >','< / div>'); 

查看相关 Codeigniter文档



注意:已更新为正确的函数引用(验证应为form_validation)。


I'm trying to customize the CSS/HTML for error message displays in codeigniter so I can apply a tag too each and style them up.

I tried to Google this and search the manual but must have been searching for the wrong terms - can anyone help me out?

解决方案

You can do something like this...

$this->form_validation->set_error_delimiters('<div class="error">', '</div>'); 

See the related Codeigniter documentation

Note: Updated to correct function reference (validation should be form_validation).

这篇关于如何定制/样式代码指示符错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆