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)
- The forwardAsync method is not available HOT 3
- 0.28.0 bug: when inside union, transform is not returning the transformed result HOT 2
- Avoid barrel files and create distinct files for exports HOT 6
- Best way for validation optional strings HOT 11
- Docs: Add ctrl + k hotkey for search to enable searching on windows (cmd is reserved) HOT 10
- Method of modifying input type to account for acceptable invalid inputs HOT 5
- Transformation action now executes after failed schema check HOT 41
- [i18n] Add Dutch HOT 5
- Enable `v.recursive()` getter to accept a `value` to improving usage flexibility HOT 10
- Schema with interpolated value fails HOT 5
- [docs] Command + K doesn't prevent default, opening the URL bar in Firefox HOT 2
- Tree shaking is not performed on `RegExp` in Webpack HOT 4
- Custom validator: what to put in expect and actionIssue arguments HOT 2
- Add possibility to convert entries to input types if possible HOT 1
- Nullable form field with constraints HOT 4
- flatten return type/FlatErrors type is incorrect for object schemas that contain properties with async schemas HOT 4
- Request for Enhancement: Support for Multiple Keys in variant Function HOT 3
- Derived Schema Validations? HOT 1
- Partial variant schema HOT 1
- Can't get `instance` to work 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.