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.

BUG: [Display(Prompt="...")] not working on textarea elements. #4903

Closed
@Bartmax

Description

@Bartmax

Model:

[DataType(DataType.MultilineText)]
[Display(Prompt =nameof(Issue))]
public string Issue { get; set; }

Using input:
placeholder attribute render correctly

<input asp-for="Issue" class="form-control" />

<input class="form-control" 
       type="text" 
       id="Issue" 
       name="Issue" 
       placeholder="Issue" 
       value=""
       data-val="" data-val-required="The Issue field is required."  />

Using textarea:
placeholder attribute missing from output

<textarea asp-for="Issue" class="form-control"></textarea>

<textarea class="form-control" 
          data-val="true" 
          data-val-required="The Issue field is required." 
          id="Issue" 
          name="Issue">
</textarea>

image

Expected:
Both textarea and input should have the placeholder attribute populated.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions