I have a java.sql.Time field in a model that I’m trying to populate from a form submission. Whatever format it’s expecting for those values isn’t the one(s) I want to use, validation always results in “Incorrect value”.
How can I customize the parsing for these values? I thought I’d seen how to do it a while back but I can’t find that info now that I actually need it.
The magic word was “binding”. What I need to do is create a custom global binder.
Update: here’s my custom binder that will handle several different time formats:
I put this in
app/libwhich works fine, I’m still debating whether this the “right” place for it.