Add better error reporting for bad configs.

- Check if there were errors from parsing before overwriting with
  validation errors.
Do type validation before required validation.