Note: I already opened issue #7910 in the kendo-ui-core repo for this but wasn't sure if I should report this through the Feedback Portal.
The TextArea TagHelper does not render the "maxlength" attribute when set via data annotations.
Note: this is essentially the same issue from #6884 but applies to the TextArea helper (and not the TextBox helper), so perhaps the fix for that issue just needs to be applied to the TextArea helper (it's always that easy, right? 😉).
Given the following model property:
[StringLength(500)]
[DisplayName("Example")]
public string Example { get; set; }
The Kendo TextArea helper:
<kendo-textarea for="Example" rows="3"></kendo-textarea>
...generates code without the "maxlength" attribute:
<textarea
data-val="true"
data-val-length="The field Example must be a string with a maximum length of 500."
data-val-length-max="500"
id="Example"
name="Example"
data-role="textarea"
aria-disabled="false"
rows="3"
class="!k-overflow-auto !k-flex-none k-input-inner"
autocomplete="off">
</textarea>
The default ASP.NET Core TextArea helper:
<textarea asp-for="Example" rows="3"></textarea>
...generates code with the "maxlength" attribute:
<textarea
rows="3"
data-val="true"
data-val-length="The field Example must be a string with a maximum length of 500."
data-val-length-max="500"
id="Example"
maxlength="500"
name="Example">
</textarea>
The Kendo helper should generate the "maxlength" attribute like the built-in helper.
Model binding is supported for the TextArea HTML Helper
@Html.Kendo().TextAreaFor(x => x.Test).Rows(3)
but the corresponding option for the TagHelper is not implemented
<kendo-textarea for="@Model.Test" rows="3"></kendo-textarea>
Bug report
TextArea wrapper does not render correctly in v2021.1.224
Reproduction of the problem
Declare a Html.Kendo().TextArea() in ASP.NET project
Current behavior
The TextArea value does not retain.
Expected/desired behavior
TexArea shall render as in previous Kendo Ui versions
Related to Ticket #1509117
Environment
Kendo UI version: 2021.1.224
Browser: [all]