Unplanned
Last Updated: 29 Jun 2022 13:04 by Nathan
Nathan
Created on: 29 Jun 2022 13:04
Category: Checkbox
Type: Feature Request
1
Enhance the CheckBoxFor helper to render data-val attribute based on the model field's custom data annotation

Currently, if the field the CheckBoxFor helper is bound to has a custom validation attribute, for example:

[MyCustomValidation(ErrorMessage = "Custom error message.")]
public bool Checkme { get; set; } 

[AttributeUsage(AttributeTargets.Property)]
public class MyCustomValidation : ValidationAttribute, IClientValidatable
{

//...

}

the CheckBox's input does not render a data-val-mycustomvalidation="Custom error message."  attribute.

The standard MVC @Html.CheckBoxFor helper renders the data-val attribute, so it would be nice if the Telerik's CheckBoxFor helper had the same capabilities.

More details: Ticket ID: 1570806

0 comments