Search code examples
grailsgsp

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 : enter image description here

How to remove bullet from the message?


Solution

  • Try this..,.

    <g:hasErrors bean="${loginValidation}" field="userPassword">
        <g:fieldError bean="${loginValidation}" field="userPassword"/>
    </g:hasErrors>