Flattening Option<Option<string>> to None for Missing or Empty Strings

How can I flatten Option<Option<string>> in schema :

  reference: S.optionalWith(S.OptionFromNonEmptyTrimmedString, {
    as: "Option",
  }),


I want NOne() either if the field is missing or empty string
Was this page helpful?