Skip to content

Add title attribute with value of error message #1

Open
@khalidabuhakmeh

Description

When adding a validation attribute, you can specify the ErrorMessage. This message can be added to the input as a title attribute and displayed to the user.

    <div class="form-group mb-2">
        <label asp-for="Name"></label>
        <input asp-for="Name" type="text" class="form-control" 
               title="Must be Khalid or RoboCop"
               pattern="(Khalid|RoboCop)">
    </div>

Arc -2024-06-21 -11-31-03

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