im using martini with the binding middleware package. i've set up validation on my struct but i'm not sure on how to properly handle it.
is it enough to simply do something like this
m.Post("/todos", binding.Json(Todo{}), func(todo Todo, error binding.Errors) {
if len(error) == 0 {
// error
}
})
to check if an error has occurred or is there a more appropriate method. thanks for any help!