© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
Custom Message for `Schema.optional` in Validation - Effect Community
EC
Effect Community
•
2y ago
hannesju
Custom Message for `Schema.optional` in Validation
Is it possible to set your own message for the
Schema.optional
Schema.optional
? It doesn
't accept the message annotation
, and
missingMessage
missingMessage
doesn
't seem to do anything
. Example
https://codesandbox.io/p/sandbox/wzchh3?file=%2Fsrc%2Findex.ts
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
Issue with Custom Message in `Schema.optional` vs `Schema.optionalWith`
EC
Effect Community / schema
8mo ago
Issue with optional strings in schema validation
EC
Effect Community / schema
2y ago
Custom error message for missing key in schema definition
EC
Effect Community / schema
17mo ago
Boolean Validation for Schema
EC
Effect Community / schema
2y ago