I'm using DropDownList in grid as EditorTemplate. If no value is selected I get a message that says "The Id field is required". How to change the message or remove it completely?
Depending what you want - to remove or to change the message - here are the 2 approaches:
To change it, in your Model, adjust the Required modifier above the properties you want to display a custom message to (see screenshot for end result):
publicclassCalls
{
[Required(ErrorMessage="This is a custom validation message")]
publicstring? Name { get; set; }
}
To remove it completely, remove the Required modifiers above the properties (see gif):
publicclassCalls
{
// [Required(ErrorMessage="This is a custom validation message")]publicstring? Name { get; set; }
}
Kind regards,
Vasko
Progress Telerik
Stay tuned by visiting our public roadmap and feedback portalpages. If you're new to the Telerik family, be sure to check out our getting started resources, as well as the only REPL playground for creating, saving, running, and sharing server-side code.