Grails: using span instead of list for renderErros tag

By default renderErrors tag in grails supports list or xml to display errors, but if we want to display error next to the field as shown below then list is not the best way to go.

Amount is required

So to resolve this issue I extended the current grails ValidationTagLib and override the tag renderErrors to give my own implementation as shown below.