How to extend an action/check? #833
-
As a library developer, I want to extend some existing action/check with new behavior. Let's say I want to extend Is there a way to do so with minimal boilerplate? What I mean is, I can't use something like: const safeUrl = (message?: string) => v.pipe(v.url(message), v.check(isSafeUrl, message)) because |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This probably works as expected when adding |
Beta Was this translation helpful? Give feedback.
This probably works as expected when adding
v.string()
to the beginning of the pipeline. Without the schema, the actions wouldn't know what type to expect because they infer it from the schema. But I understand that this is not optimal in all cases and a more minimal API without a schema would be appreciated. Feel free to create an issue so others can join and discuss.