Skip to content

How to use different text for label in error message (with classLabel)? #28

@missmatsuko

Description

@missmatsuko

I have a checkbox with a very long label containing some consent messaging. I'd like the error to just say "Consent is required" rather than the whole label text.

It looks like using this class on a span within the label should do just that, but I don't see any change in the error message.

// label to pick textContent from to insert field name into error message
    classLabel: 'form-control-label',

Am I understanding the use of classLabel correctly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions