[ kendo scheduler ]Use Remote Validation for the Scheduler

0 Answers 18 Views
Editor Scheduler Validation
sun
Top achievements
Rank 2
Iron
Iron
Iron
sun asked on 31 May 2022, 04:37 PM

Hi,

      Method is https://docs.telerik.com/kendo-ui/knowledge-base/remote-validation?_ga=2.30044991.1233608935.1653012997-543877616.1650858150

      Demo is http://dojo.telerik.com/UgELisOy

      In above demo,  

      var remoteValidator = {
            valid: false,
            initiated: false,
            check: function(element, validator) {
            remoteValidator.initiated = true;
            //simulate Ajax
            setTimeout(function() {
                  //TODO: set to true if valid
                  remoteValidator.valid = true;

                  validator.validateInput(element);
                  remoteValidator.initiated = false;
            }, 1000);
          }
      };

      The form cannot be submitted normally.

       Thank you for your help!

                            
Martin
Telerik team
commented on 03 Jun 2022, 01:56 PM

Hi. You will see that there are several comments in the remoteValidator code that guide what the user should implement himself in order to complete the example. In this case, you will need to have a remote endpoint which should return true/false as a result of the remote validation you have implemented. Currently, you can see that remoteValidator.valid is always false and therefore the event cannot be saved.

 

sun
Top achievements
Rank 2
Iron
Iron
Iron
commented on 05 Jun 2022, 03:07 PM

hi,  

  In above code(simulate Ajax):  remoteValidator.valid = true;

  It's always true.

  I also have  tested a remote endpoint which return true, It's still cannot be submitted normally.

 Thank you for your help!

Martin
Telerik team
commented on 08 Jun 2022, 01:34 PM

Could you please check this version of the example and let me know if it works as expected?

No answers yet. Maybe you can help?

Tags
Editor Scheduler Validation
Asked by
sun
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or