Commit Graph

2 Commits

Author SHA1 Message Date
Karl Isenberg a0743e6912 fix: Clean up object.FieldPath
- Use string.Builder to be slightly more efficient
- Format invalid types with Go syntax, wrapped with brackets
- Test that invalid types don't panic
2022-01-07 18:27:57 -08:00
Karl Isenberg fb98bc7877 fix: Handle more validation errors as field errors
- Using field.Error allows more errors to be wrapped as a
  ValidationError, instead of interrupting validation and exiting
  early.
- Add explicit validation for kind (clearer error).
- Move NestedField from testutil to object, so it can be used at
  runtime.
2022-01-07 12:06:43 -08:00