You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when a form gets generated from a model class, there is no visual indication of which form fields are required. The user must first submit the form before getting feedback about which form fields are required.
Proposed fixes
For each form input that gets generated from a model property annotated with a RequiredAttribute, include additional markup to indicate that the field is required. For example:
Overview
Currently, when a form gets generated from a model class, there is no visual indication of which form fields are required. The user must first submit the form before getting feedback about which form fields are required.
Proposed fixes
For each form input that gets generated from a model property annotated with a
RequiredAttribute
, include additional markup to indicate that the field is required. For example:<div class="mb-3"> + <span class="text-danger">*</span> <label for="title" class="form-label">Title:</label> <InputText id="title" @bind-Value="Movie.Title" class="form-control" aria-required="true" /> <ValidationMessage For="() => Movie.Title" class="text-danger" /> </div>
Before
After
The text was updated successfully, but these errors were encountered: