1

I have created one custom form and implemented magento validation. Magento validation works for all fields but message of one field is not displaying. I have added datepicker in this field.

Below is the code of my field:

<div class="field field-name-reward_date required">
<label class="label required" for="reward_date"><span>Reward Distribution Date</span></label>
<div class="control date">
    <input type="text" name="reward_date" class="input-text _has-datepicker mage-error" data-validate="{'required':true, 'validate-reward-date':true}" id="dp1544438747646" aria-required="true" autocomplete="off" aria-invalid="true">
    <span class="calender-icon glyphicon glyphicon-calendar"></span>
</div>

It shows red border when field is not valid, but it not show the message. enter image description here

Please let me know if anyone can help.

  • Hi Gaurav facing the same issue do you got any solution for this – Sairam Sigirisetty Jan 26 at 15:07
  • It was because of datetimepicker which I was using here. So I replaced it with datetimerangepicker with single datepicker. – Gaurav Agrawal Jan 28 at 9:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.