Comments (2)
ah, i see. thanks for this, it makes sense.
from valibot.
This works but you can't use an action as the first argument of pipe
. See this playground.
import * as v from 'valibot';
const myCustomValidator = (length: number) => v.pipe(
v.string(),
v.maxLength(length),
)
const MySchema = v.object({
someString: v.pipe(
v.string(), // <-- Schema required
myCustomValidator(1),
)
});
from valibot.
Related Issues (20)
- Add validation action to validate JWT
- Type of ValiError.issues HOT 6
- Property 'key' does not exist on type 'IssuePathItem' HOT 2
- Provide source locations for errors in string data HOT 6
- Empty email field validation HOT 1
- Empty object type returned by flattening a Variant Schema HOT 4
- Unable to use partial() with SchemaWithPipe HOT 2
- Improve DX with `babel-plugin-transform-regex` HOT 6
- TS2589: Type instantiation is excessively deep and possibly infinite using forward and check HOT 2
- Shorthand for transforming `null` to `undefined` HOT 1
- How to pass down original input for use in config message HOT 5
- Validation for multiple possible values or notValues HOT 4
- Codemod with `toTrimmed` fails HOT 2
- Complex error messages using enums HOT 11
- Error: 'pipe' not found in imported namespace 'v' HOT 3
- issue - recursive schema seems to produce incomplete Issues HOT 3
- Proposal to Make Prettify Type in Valibot Overridable for Better Developer Control HOT 2
- Valid emails being flagged as invalid HOT 1
- Simple Object with key HOT 4
- General variant key override HOT 4
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.