// Required validates an interface for requiredness func Required(path, in string, data interface{}) *errors.Validation { val := reflect.ValueOf(data) if reflect.DeepEqual(reflect.Zero(val.Type()), val) { return errors.Required(path, in) } return nil }
// RequiredString validates a string for requiredness func RequiredString(path, in, data string) *errors.Validation { if data == "" { return errors.Required(path, in) } return nil }
// RequiredNumber validates a number for requiredness func RequiredNumber(path, in string, data float64) *errors.Validation { if data == 0 { return errors.Required(path, in) } return nil }