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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Custom Validation attribute not working on Date Picker

Thread ID:

Created:

Updated:

Platform:

Replies:

150915 Jan 24,2020 05:52 AM UTC Feb 5,2020 09:41 AM UTC ASP.NET Core - EJ 2 1
loading
Tags: General
Muhammad Tassadaque Zia
Asked On January 24, 2020 05:52 AM UTC

HI,

We have custom validation attribute RequiredIf decorated on date property of model. but generated html is not adding required attribute to the tag as shown below
Class Property

       [RequiredIf("chkM", 1, "Date is Required")]
        public DateTime? MDate { get; set; }

<ejs-datepicker id="MDate" format="dd/MM/yyyy" ejs-for="MDate" placeholder="Choose a Date" enabled="true"></ejs-datepicker>

it is generating following html

<input onchange="datecheck()" id="MDate" data-val="true" name="MDate" ejs-for="true" class="e-control e-datepicker e-lib e-input e-keyboard" placeholder="Choose a Date" aria-placeholder="Choose a Date" aria-live="assertive" aria-atomic="true" aria-haspopup="true" aria-activedescendant="null" aria-owns="MDate_options" aria-expanded="false" role="combobox" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" aria-invalid="false" aria-disabled="false" tabindex="0" value="">

I am expecting following attribute also in tag

<input type="text" data-val="true" data-val-requiredif=" Date is Required" data-val-requiredif-dependentproperty="chkM" data-val-requiredif-targetvalue="1" id="MDate" name="MDate" value="">





Banupriya Selvaraj [Syncfusion]
Replied On February 5, 2020 09:41 AM UTC

Hi Muhammad, 

Thanks for contacting Syncfusion support. 

We are sorry for the delay update. 

We have validated this reported query and created a feature report for “Custom validation support for ASP.NET Core”. It will be included in our Volume 1 release which is expected to be rolled out end of March.  

You can track the current status of your request through this link.   

We will update you once it released and we appreciate your patience until then. 

Regards, 
Banupriya  


CONFIRMATION

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

Live Chat Icon For mobile
Live Chat Icon