Skip to content

Custom Error Messages #24

@Nick-Lucas

Description

@Nick-Lucas

Error messages need to be customisable.

  • Add a definitive union literal of error types and attach them to LightTypeError throws

Provide a way to configure, ie:

  • Add add .configure method to lt which returns a new lt with mappings on
  • Add general mappings to the initial type creation like Zod: lt.number({ required: 'Required' })
  • Add per validator messages
  • Add a validation abstraction which can be passed to .pipe with just a condition callback and a message

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions