Skip to content

Latest commit

 

History

History
582 lines (276 loc) · 27.4 KB

File metadata and controls

582 lines (276 loc) · 27.4 KB

Changelog

0.22.2 (2026-04-25)

Bug Fixes

  • Fixed issue with ,omitempty suffix in json tag (#218) (0ed4743)

0.22.1 (2026-04-03)

Features

Bug Fixes

  • Clear values on ExecCtx when creating a new one (#217) (f26555a)

0.22.0 (2025-12-14)

⚠ BREAKING CHANGES

  • all schemas now return a issue list. Issue paths are now slices

Features

  • better panic message when user passes non pointer destination to parse/validate functions (#205) (9570fec)
  • experimental custom schema API (#187) (76a1d47)
  • new issue formatting utilities. (1305e68)

0.21.10 (2025-12-12)

Features

0.21.9 (2025-11-12)

Features

  • add IPv6 and generic IP validators for strings (#199) (c6fe2a3)
  • i18n: add Azerbaijani message for IP validator (#198) (272a6bf)
  • i18n: add Japanese message for IP validator (IPv4) (#195) (0d3278f)

0.21.8 (2025-11-02)

Features

0.21.7 (2025-10-17)

Features

  • zhttp now supports multipart form data (3fae95f)

0.21.6 (2025-08-24)

Features

  • add Japanese (ja) community translation (#181) (aa0ca94)

0.21.5 (2025-07-23)

Bug Fixes

  • z.time.Format() not working (638ff57)

0.21.4 (2025-07-13)

Features

0.21.3 (2025-07-03)

Features

0.21.2 (2025-06-15)

Bug Fixes

0.21.1 (2025-05-24)

Features

0.21.0 (2025-05-03)

⚠ BREAKING CHANGES

  • transforms and tests are now typesafe for the schema you are using. No more typecasting in Zog! (#149)

Features

  • provide better panic msgs and docs (#153) (f605689)
  • transforms and tests are now typesafe for the schema you are using. No more typecasting in Zog! (#149) (2da0c0c)

0.20.0 (2025-04-26)

⚠ BREAKING CHANGES

  • Deprecated z.Schema in favor of z.Shape. No plans to remove z.Schema for now
  • Allow empty strings during parsing to not trigger required. Instead do .Min(1). (#148)
  • Transforms are now run sequentially with tests in the order they were defined in. schema.PostTransform has been deprecated and until it is removed it will work just like schema.Transform. Therefore schema.Min(1).Trim().Min(1) will work and first check string length > 1 then trim then check again for string len > 1
  • implemented preprocess, removed preTransforms

Features

  • Deprecated z.Schema in favor of z.Shape. No plans to remove z.Schema for now (544f03d)
  • implemented preprocess, removed preTransforms (9dde9be)
  • ordered transforms (#147) (1db8140)

Bug Fixes

  • Allow empty strings during parsing to not trigger required. Instead do .Min(1). (#148) (da1b680)

0.19.2 (2025-04-18)

Features

0.19.1 (2025-04-13)

Features

  • customFunc for easy custom schemas. Usage is z.CustomFunc[T any](func (valPtr *T, ctx z.Ctx) bool {}, ...TestOptions) (#141) (4c2b42e)

Miscellaneous Chores

0.19.0 (2025-04-03)

⚠ BREAKING CHANGES

  • Test.ValidateFunc's name has been changed to Test.Func

Features

  • implemented super refine like API. Create complex custom tests easily (#138) (e44e593)

Miscellaneous Chores

0.18.4 (2025-03-16)

Features

  • support for custom strings, numbers and booleans (#131) (29cb24d)

Miscellaneous Chores

0.18.2 (2025-03-08)

⚠ BREAKING CHANGES

  • zog tag changed to a catch all instead of superseding the other tags

Bug Fixes

  • zog tag changed to a catch all instead of superseding the other tags (869268e)

Miscellaneous Chores

0.18.1 (2025-03-08)

Features

  • allow zog to use multiple struct tags zog, json, form, query, env (5426bb6)

Miscellaneous Chores

0.18.0 (2025-03-08)

⚠ BREAKING CHANGES

  • DELETE Method on zhttp also supports multiplexing based on content type header
  • Removed deprecated z.ParseCtx interface. Use z.Ctx instead
  • Zog issue interface is converted into a struct (#119)

Bug Fixes

  • DELETE Method on zhttp also supports multiplexing based on content type header (b8ebdc7)
  • export pre & post transforms from main zog package (57703a4)

Miscellaneous Chores

Code Refactoring

  • Removed deprecated z.ParseCtx interface. Use z.Ctx instead (0bb4cfd)
  • Zog issue interface is converted into a struct (#119) (a68b393)

0.17.2 (2025-03-02)

Performance Improvements

  • removed allocation for struct schemas (4cd379c)

0.17.1 (2025-02-28)

Performance Improvements

  • removed one allocation per schema (14f3511)

0.17.0 (2025-02-22)

Features

0.16.6 (2025-02-21)

Bug Fixes

  • delete method also only allows for parsing of query params just like GET and HEAD with zhttp (6bc7636)
  • zhttp GET request with json or form content type still fetches from params (867cd06)

Performance Improvements

  • slice pathbuilder for fewer allocations (a20f5e2)
  • slice pathbuilder for fewer allocations (a20f5e2)

0.16.5 (2025-02-20)

Performance Improvements

  • removed string sync pool since it has worse performance (#103) (602c146)

0.16.4 (2025-02-20)

Bug Fixes

  • panic on single letter query param zhttp (#101) (cd8d172)
  • zhttp supports more complex content type strings (#99) (9460ea2)

Performance Improvements

  • string builder for default langmap replaceble placeholders (#102) (8f3c881)

0.16.3 (2025-02-20)

Performance Improvements

  • internal tests for primitive values now use pointers. User tests are unaffected (#97) (6d3a234)

0.16.2 (2025-02-19)

Performance Improvements

  • issues syncpool and issues.Collect function to collect issues into sync pool (#93) (91d6b3e)

0.16.1 (2025-02-19)

Features

Performance Improvements

  • implemented syncpool for internal structures (#91) (f1717f6)

Miscellaneous Chores

0.16.0 (2025-02-11)

⚠ BREAKING CHANGES

  • structs can no longer be required or optional. Define this in the fields instead. If you need to model a struct that might exist use a pointer to a struct. This should not affect most users as now it works how everyone intuitively thought it worked. (#88)
  • renamed ZogError to ZogIssue to be more aligned with Zod. Deprecated a bunch of APIs for naming consistency. conf.ErrorFormatter removed in favor of conf.IssueFormatter (#86)

Features

  • new test option to set the issue path for issues generated from that test (#87) (47d24a1)
  • testFunc method on schemas for easier custom tests (#82) (52a90eb)

Bug Fixes

  • structs can no longer be required or optional. Define this in the fields instead. If you need to model a struct that might exist use a pointer to a struct. This should not affect most users as now it works how everyone intuitively thought it worked. (#88) (9681ebb)

Miscellaneous Chores

Code Refactoring

  • renamed ZogError to ZogIssue to be more aligned with Zod. Deprecated a bunch of APIs for naming consistency. conf.ErrorFormatter removed in favor of conf.IssueFormatter (#86) (49f01e3)

0.15.1 (2025-02-09)

Bug Fixes

  • ZogErr Value() doesn't return underlying value (#77) (1f7d2ff)

0.15.0 (2025-02-03)

Features

  • New Validate method to validate existing structures (#68) (8297022)

Miscellaneous Chores

0.14.1 (2025-01-13)

Bug Fixes

  • Schemas are now public. New complex & primitive schema interfaces (#64) (9e659e5)

0.14.0 (2025-01-02)

Features

0.13.0 (2024-11-12)

Features

  • Implemented Struct().Pick(), Struct().Omit() and Struct().Extend() (#53) (8adc803)

0.12.1 (2024-11-11)

Features

  • support for parsing into pointers. Now you may have pointers in the destination (#42) (fd6bbbf)

Miscellaneous Chores

0.12.0 (2024-11-09)

Features

  • implement z.String().Trim() as a built in PreTransform that trims the input data if it is a string (#51) (1d65859)
  • schema custom coercer support via the z.WithCoercer function and custom time formats via z.Time.Format() fuction (#48) (1472669)
  • time coercer now support for unix timestamps in ms (#47) (4c5b4bd)
  • zhttp package now supports providing your own custom parsers (#50) (e8a111f)

Bug Fixes

  • required check not working with zero values from other types (#44) (1abc8e8)

0.11.0 (2024-11-01)

⚠ BREAKING CHANGES

  • zhttp.NewRequestDataProvider() which was deprecated is now removed. Please use zhttp.Request() instead
  • ZogError.Error() no longer proxies to the wrapped error. Now it returns a string representation of the ZogError. You can still access Wrapped error through Unwrap()

Features

Bug Fixes

  • consider " " to be a zero value (d4856e9)
  • zhttp handles input json being null (9e8b8d3)

Miscellaneous Chores

Code Refactoring

  • removed zhttp new data provider (86d4e6f)

0.10.0 (2024-10-07)

Features

  • add test options to time methods (42db318)

Bug Fixes

  • boolean false parsing behavior (#35) (8670b64)
  • struct merge panic on merging schemas with transforms (90ccc88)

0.9.1 (2024-09-26)

Bug Fixes

0.9.0 (2024-09-22)

Features

  • i18n package with spanish & english translations (#28) (1120fd6)
  • improved zhttp library (#32) (891bb6c)
  • trim space for env variables (166d881)

0.8.0 (2024-09-16)

Features

Bug Fixes

  • required custom z.Message (#24) (49198a0)
  • structs now handle both uppercase and lowercase first letters (4fbc9c3)

0.7.0 (2024-09-09)

⚠ BREAKING CHANGES

  • custom tests now require that you pass a test struct or use the TestFunc() helper
  • order of schema.Test() params has changed from (errorCode, z.Message(), func) to (errCode, func, [optionalTestOptions])
  • All z.Errors functions have changed. I still don't recommend you use them since they might still change in the future

Features

  • better errors (fe78a8d)
  • move coercers to default variable to make it easier to replace the coercers struct without losing access to the default coercers (2387330)
  • new & improved API for custom tests (9acfc37)

Bug Fixes

  • bool coercer (#14) (01f8c17)
  • minor fix to order of operations when required is set (cff0fc3)
  • Time().EQ() was broken due to typo (9310e1a)

Miscellaneous Chores

Code Refactoring

  • custom test method is now more in line with the rest. (d163f36)

0.6.2 (2024-08-16)

⚠ BREAKING CHANGES

  • slice errMap will now access validation errors for the first element through [0] key rather than 0 key

Features

Miscellaneous Chores

0.6.1 (2024-08-16)

Bug Fixes

  • more realistic min go version (#6) (658f060)

0.6.0 (2024-08-16)

Features

  • quality of life improvements for working with errors (#3) (1f3c3d0)

0.5.0 (2024-08-12)

Features

  • added global functions to time validation (d4abdca)
  • v0.5 release! (#1) (7ac74c7)

Bug Fixes

  • better huristic for zhttp (e311d91)
  • optional bug with slices (107f4d6)

Miscellaneous Chores