Hi,
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!
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.
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!