Issue with Composing Schema.Option with PhoneNumber Schema in Effect Typescript Library
I'm trying to model a domain schema in order to compose with
This schema works as expected:
but it fails if used in combination with
So I tried using a transformation, but it looks
using
Schema.Option* when needed.This schema works as expected:
but it fails if used in combination with
Schema.Option (this is the content of an HOF; instead of PhoneNumber there is schema parameter) as it looks the filter error takes precedence:So I tried using a transformation, but it looks
Schema.typeSchema skips decode and only Schema.String is checked against. Same using Schema.is as it always returns true even if should return false as the predicate yields false. using
Schema.decode w/o Schema.typeSchema works as expected and fails correctly: