Completed
Last Updated: 14 Mar 2023 07:23 by ADMIN
Pratik
Created on: 07 Mar 2023 13:15
Category: UI for Blazor
Type: Feature Request
0
Get Display name form DataAnnotation Attribute on Form

For Example, I have DTO like below, how on Form I will Display Lable for FormItem from value get from Display Name

    public class DepartmentRequestDTO
    {
        [Display(Name = "Department Id")]
        [Required(ErrorMessage = "Department Id" + ErrorConstant.RequiredMsg)]
        public int DepartmentId { get; set; }

        [Display(Name = "Department Name")]
        //[Required(ErrorMessage = "Department Name" + ErrorConstant.RequiredMsg)]
        [Required]
        [StringLength(50, MinimumLength = 3)]
        public string Name { get; set; }

        [Display( Name = "Remarks")]
        //[Required(ErrorMessage = "Remarks" + ErrorConstant.RequiredMsg)]
        [StringLength(250, MinimumLength = 3)]
        public string Remarks { get; set; }
    }
1 comment
ADMIN
Dimo
Posted on: 14 Mar 2023 07:23

Hi Pratik,

This is already supported.

Regards,
Dimo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.