Skip to content

Help with circular schemas #673

Answered by fabian-hiller
wadjoh asked this question in Q&A
Jun 25, 2024 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

I think the main problem is that your data contains a circular reference, which leads to a parse execution that never ends. lazy is intended for recursive schemas like binary trees that end at some point. I think we could technically solve this problem by memorizing what lazy does, but the main question for me is whether this is outside the scope of Valibot. Maybe you should validate the data before it is mapped to be circular.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@wadjoh
Comment options

@fabian-hiller
Comment options

Answer selected by wadjoh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants