Effect CommunityEC
Effect Community3y ago
7 replies
Stephen Bluck

Overwriting Error Message in Schema

How do I overwrite an error message in a schema?
const TopicTitle = NonEmptyString50.pipe(
  S.message(
    () => "A title is required and must be less than 50 charactes long"
  ),
  S.brand("TopicTitle")
);

ArrayFormatter is giving back the default error message:
Expected string, actual null
Was this page helpful?