Closed SandroMaglione closed 1 week ago
Latest commit: 7c758e48c12aa042b10676f191b86d52d958fb8d
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Type
Description
Added
extractAll
andextractSchema
toUrlParams
. They allow to extract all key-value pairs fromUrlParams
and validate them using a givenSchema
.The PR also added a new
Schema.BooleanFromString
toSchema
.Motivation
When using
searchParams
from frameworks likenext
, I often need to validate the correct shape using aSchema
. The params have this type:Using
fromInput
+extractSchema
allows to make sure that the params are valid (or handle aParseError
otherwise).