Skip to content
This repository was archived by the owner on Dec 19, 2022. It is now read-only.
This repository was archived by the owner on Dec 19, 2022. It is now read-only.

Create custom message #45

Description

@tolbard

Can we be able to override the specific validation error message by a other message.

For example:
username: s.optional(s.regex(/^(?=.*[a-z])[1-9a-z][0-9a-z]{3,19}$/i))

change to :
username: s.optional(s.regex(/^(?=.*[a-z])[1-9a-z][0-9a-z]{3,19}$/i, message:'Please follow this rules for your username: Alphanumeric characters only, maximum of 20 characters, minimum of 4 characters, at least one letter, first character cannot be 0, whitespace is not allowed'))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions