Skip to content

Allow user-friendly key names in user messages #190

@jmar777

Description

@jmar777

It would be nice to be able to define a user-friendly key (or "label"?) that would be used when rendering validation messages. For example:

var schema = {
    firstName: Joi.string().regex(/^[a-z]+$/).required().label('First Name')
};

The validation message template would then substitute {{key}} with First Name (instead of firstName).

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew functionality or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions