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

ValidationSummary could provide some way to jump to the field that is wrong #1469

@dougbu

Description

@dougbu

@Html.ValidationSummary() and div validation-summary="All"/> currently generate

  <div class="validation-summary-errors" data-valmsg-summary="true">
    <ul>
      <li>Something happened with your model.</li>
      <li>Something happened with field Property1.</li>
    </ul>
  </div>

Should instead generate

  <div class="validation-summary-errors" data-valmsg-summary="true">
    <ul>
      <li><label>Something happened with your model.</label></li>
      <li><label for="Property1">Something happened with Property1.</label></li>
    </ul>
  </div>

The <label/> wrapping for model-level errors ensures the default styles are consistent.
See original MVC 5.2 request for more details.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions