Should pipes abort early by default? #624
IlyaSemenov
started this conversation in
Polls
Replies: 1 comment 1 reply
-
For context, in the beginning Valibot only returned a single issue for a path, and later expanded that because we had several people requesting it. I think there are legitimate examples for both preferences. For anyone who prefers import * as v from 'valibot';
v.setGlobalConfig({ abortPipeEarly: true }); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Following #618, I am wondering why pipes don't abort early by default? What I mean is, take the example from valibot documentation:
Naturally, there is no point in testing (and reporting) the string ending if it's not even an email address, and that's an inner property of a particular pipe, not the whole schema. Arguably, the majority of pipes will be structured similarly, and only select few pipes will test different aspects independently. For those cases, I'd say pipe is not even a good name. In real life, if something is stuck in the pipe (=fails validation) it's not moved further along. If liquid goes in parallel, it's a manifold, not a pipe.
I propose to set
abortPipeEarly
by default, and allow to revert this withv.config()
— opposite to how it works now.6 votes ·
Beta Was this translation helpful? Give feedback.
All reactions