简体   繁体   中英

How to remove auto tag (<ul> & <li>) from g:renderErrors Grails?

I am displaying custom error in GSP page. Using <g:renderErrors> , the message displayed inside the <ul><li>---</li></ul> tag automatically. 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>

Refer from here

<g:eachError var="error">
    <g:message error="${error}"/>
</g:eachError>

I hope it helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM