schema
schema copied to clipboard
pipe behavior is different than described in docs
Hi ;)
pipe schema validation is executed in reversed order than expected.
const schema = pipe(string, minStringLength(10));
First minStringLength will be validated instead of string and if you try to validate e.g. undefined the type error will be thrown. See https://codesandbox.io/s/adoring-galileo-76vtn?file=/src/index.ts
How should it work in your opinion @mmiszy ?
Not sure yet ;)