[英]How to remove auto tag (<ul> & <li>) from g:renderErrors Grails?
I am displaying custom error in GSP page. 我在GSP页面中显示自定义错误。 Using
<g:renderErrors>
, the message displayed inside the <ul><li>---</li></ul>
tag automatically. 使用
<g:renderErrors>
,该消息自动显示在<ul><li>---</li></ul>
标记内。 But I dont want to do that. 但是我不想那样做。 I want to display plain message.
我想显示简单的消息。
Code : 代码:
<td><input type="password"name="userPassword"/></td>
<td>
<g:hasErrors bean="${loginValidation}" field="userPassword">
<g:renderErrors bean="${loginValidation}" field="userPassword"/>
</g:hasErrors>
</td>
Snap : 捕捉:
How to remove bullet from the message? 如何从邮件中删除项目符号?
Try this..,. 尝试这个..,。
<g:hasErrors bean="${loginValidation}" field="userPassword">
<g:fieldError bean="${loginValidation}" field="userPassword"/>
</g:hasErrors>
<g:eachError var="error">
<g:message error="${error}"/>
</g:eachError>
I hope it helps. 希望对您有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.