Ejemplo n.º 1
0
func (r *FormRenderer) WriteHelp(w io.Writer, field *form.Field, help string) error {
	span := html.Span(html.Text(help))
	span.Attrs = html.Attrs{"class": "help-block"}
	_, err := span.WriteTo(w)
	return err
}
Ejemplo n.º 2
0
func (r *FormRenderer) WriteError(w io.Writer, field *form.Field, err error) error {
	span := html.Span(html.Text(err.Error()))
	span.Attrs = html.Attrs{"class": "help-block"}
	_, werr := span.WriteTo(w)
	return werr
}