robfig/revel — pull request #511 by davidzchen (2014-02-16 10:34:46+00:00)
Title: Make Field Error Class for a Field settable

Fixes #501

This change adds an argument to `NewField` to set the `errorClass` for the field. I have updated all the examples; however, this is an API change, and anyone using the `field` function in their templates will have to add an extra argument.

I considered implemented this such that it wouldn't be a breaking change, but since Go does not support function overloading, and I was feeling iffy about using optional arguments. The other option would be to create a completely separate function just with this extra argument but that seemed ugly too.

If you are fine with this change, I'll definitely add a note to the docs on upgrading to the next version for this.