Completed
Last Updated: 23 Aug 2024 09:39 by ADMIN
Release 2024 Q4 (Nov)
Aaron
Created on: 26 Jul 2024 18:53
Category: TextArea
Type: Bug Report
1
The TextArea TagHelper does not render the maxlength attribute

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.

1 comment
ADMIN
Ivan Danchev
Posted on: 02 Aug 2024 14:32

Hello Arron,

Thank you for reporting this issue.

In general you can open an issue in either of the two places, but when you do so in the Feedback Portal, you will get a reply from Support. We will investigate the problem and if we determine that it is a bug, we will log it in Github. Since in this case the issue already exists in both places, I've just linked them internally.

I've updated your Telerik points for reporting this bug.

Regards,
Ivan Danchev
Progress Telerik

Do you have a stake in the designеr-developer collaboration process? If so, take our survey to share your perspective and become part of this global research. You’ll be among the first to know once the results are out.
-> Start The State of Designer-Developer Collaboration Survey 2024