code: func (j *FieldDefinitions) Validate() error {
  	if j == nil {
  		return errs.New("fields not defined")
  	}
  	for name, field := range *j {
  		if err := field.Validate(); err != nil {
  			return errs.Wrapf(err, "failed to validate field %s", name)
  		}
  	}
  	return nil
  }
docs: // Validate checks that each field definition is valid