If you're using next-safe-action and need to handle validation errors beyond schema checks, this covers the patterns. It explains returnValidationErrors for business logic failures like "email already taken" and how those errors match the same structure as schema validation errors. The formatted shape mirrors your Zod schema with _errors arrays at each level, while the flattened shape separates fieldErrors and formErrors. Useful for knowing when to throw validation errors in server code versus letting schema validation catch malformed input. The display examples show exactly how to render field-level and form-level errors in either shape.
npx skills add https://github.com/next-safe-action/skills --skill safe-action-validation-errors