© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
Handling Empty Strings with Schema.NullOr and minLength - Effect Community
EC
Effect Community
•
15mo ago
joshuadima
Handling Empty Strings with Schema.NullOr and minLength
Hello
!
I
'm trying to manage a text field
.
The model accepts
Schema.NullOr(Schema.String.pipe(Schema.minLength(10)))
Schema.NullOr(Schema.String.pipe(Schema.minLength(10)))
, but if I provide an empty string
(
""
""
)
, I get an error since the string is less than 10 characters long
.
I tried using schema transformations
, but it still doesn
't work
.
Effect Community
Join
Production-grade applications in TypeScript.
6,221
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Validating and Mapping Config Strings with Schemas
EC
Effect Community / 🚀-effect
2y ago
Error Handling in Schema Transform
EC
Effect Community / 🚀-effect
3y ago
TypeScript Type Inference Issue with `Effect.forEach` and Strings
EC
Effect Community / 🚀-effect
7mo ago
Error in HttpApiEndpoint Builder: Path Schema Not Encodable to Strings
EC
Effect Community / 🚀-effect
2mo ago