Go Struct and Field validation, including Cross Field and Cross Field Cross Struct validation
Value *big.Int json:"value" binding:"required,min=1000000000000000"
// does not work
json:"email"
json:"phone"
json:"password"
context.Context
and then use one of the validation functions that accept it eg. validate.StructCtx
, but that's if it's dynamic, if looking to embed static logic from the application see here for an example go-playground/validator#462
Documentation can be found here with all tags https://godoc.org/gopkg.in/go-playground/validator.v9
At present there is no built in "Money" nor "times" validator due to different locales having to validate differently, but you can create your own validations :)
go-playground/validator
or my own custom validation func that operates on a model struct. are there any recommendations here? It seems like this repo would do the same thing, but then I'd have to come up with error messages to display to the user