Comments (2)
Thank you for your contribution! This should be fixed in v0.26.0.
from valibot.
Thank you for reporting this issue! It is right that the current implementation can potentially break the pipeline execution. I will investigate this.
Return errors only for the first schema that pass type check
This is not possible because it would break the functionality of union
for any schema where the same schema function occurs twice as part of the union. Consider the following schema.
import * as v from 'valibot';
const Schema = v.union([
v.number([v.minValue(2), v.maxValue(4)]),
v.number([v.multipleOf(10)]),
]);
const result = v.safeParse(Schema, 20);
20
is a multiple of 10
but if we break the loop after the first schema function, the second will never be executed.
from valibot.
Related Issues (20)
- TypeScript: InferInput always infers intersect as 'never' HOT 3
- [v0.31.0-rc.5] `Invalid type: Expected Object but received Object` because of `edge` runtime HOT 3
- abortPipeEarly influnces on abortEarly HOT 2
- Compiled type for actions missing typing for 'requirement' in ErrorMessage HOT 2
- [v0.31.0-rc.5] The internal function `_stringify` has a problem HOT 23
- cannot pipe a pipe HOT 2
- Enum error with React Hook Form HOT 14
- Reduce boilerplate for custom actions HOT 4
- Forward is changing the issues paths on flatten with an error in the forwarded property HOT 4
- @valibot/i18n could not be installed HOT 4
- Pipe to emit a single issue HOT 3
- Predefined keys for `ObjectSchema` HOT 4
- Automatic upgrade to v0.31.0 with Grit only works for certain patterns HOT 7
- Codemod skipping certain schema HOT 6
- Codemod - missing comma before `v.check` on `v.intersect` HOT 1
- Error while downloading codemod HOT 2
- Form submission proceeds despite validation errors using check in Valibot, causing formValue to be lost HOT 4
- Codemod using `unknown()` schema HOT 3
- Unable to enter multiple paths to forward method HOT 6
- "Unsafe assignment of an `any` value" for pipe method HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from valibot.