Open rngallen opened 2 years ago
Can I use is.Float with specification of decimal places? I will always want my float to have two decimal places
is.Float
type Foo struct { Bar float32 `json:"bar"` } func (f Foo) Validate() error { return validation.ValidateStruct(&f, validation.Field(&f.Bar, is.Float)) //<=== specify decimal places }
Can I use
is.Float
with specification of decimal places? I will always want my float to have two decimal places