We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Asp.net Core validation tag helper is ignored for the ej-drop-down-list

Thread ID:





128816 Feb 10,2017 02:40 PM UTC Feb 11,2017 11:44 AM UTC ASP.NET Core 1
Tags: DropDownList
Asked On February 10, 2017 02:40 PM UTC

Hi Support:

I added the following script, but the validation tag helper is ibeing gnored for the required property:

  <ej-drop-down-list id="CityID" watermark-text="Select" datasource="@Model.Cities">
           <e-drop-down-list-fields text="Name" value="ID" />
  <span asp-validation-for="CityID" class="text-danger" />

All the other input controls works fine, but this is the only Syncfusion control in the page in which the validation is not triggered.

What could I be missing here ?

Thanks in advanced


Prince Oliver [Syncfusion]
Replied On February 11, 2017 11:44 AM UTC

Hi David, 

Thanks for contacting Syncfusion support. 

In JQuery validation plugin by default hidden inputs are excluded from being validated on form post. Our Dropdownlist maintains the value in the hidden input and hence it is getting excluded from validation. To overcome this issue, you need to clear the defaults in the validator. Refer to the following code snippet. 

        ignore: [],// To include hidden input validation. 
        errorClass: 'e-validation-error', // To get the error message on jquery validation 
        errorPlacement: function (error, element) { 
            $(error).insertAfter(element.closest(".e-widget"));// To place the error message 

We have attached a sample for your convenience. Refer to the following link for the sample: 



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon