Skip to content

Fix loss of context when using refinements on string schemas - #25

Merged
matejchalk merged 1 commit into
matejchalk:mainfrom
markvl91:fix/loss-of-context
Apr 1, 2026
Merged

Fix loss of context when using refinements on string schemas#25
matejchalk merged 1 commit into
matejchalk:mainfrom
markvl91:fix/loss-of-context

Conversation

@markvl91

@markvl91 markvl91 commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

When listing validations of string schemas, it's possible to fall through the switch statements and into the subtype parser.

However, when this happens (as far as I know, this mostly concerns refinements), this isn't properly captured and will be undefined, causing an exception when the check parse function tries to pass the check on to the subtype parser.

@matejchalk matejchalk left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the fix.

@matejchalk matejchalk added the bug Something isn't working label Apr 1, 2026
@matejchalk
matejchalk merged commit c817142 into matejchalk:main Apr 1, 2026
6 checks passed
@matejchalk

Copy link
Copy Markdown
Owner

Patched in version 0.3.3. 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants