Commit b6071007 by Alex-Code

Update input-validation.md

Updated guide
parent 3a10c4cf
...@@ -580,11 +580,12 @@ deferred.push($.get("/check", {value: value}).done(function(data) { ...@@ -580,11 +580,12 @@ deferred.push($.get("/check", {value: value}).done(function(data) {
The ```deferred``` array also has a shortcut method ```add```. The ```deferred``` array also has a shortcut method ```add```.
``` ```
deferred.add(function() { deferred.add(function(def) {
//Asynchronous Validation here //Asynchronous Validation here
//The context of this function is the Deferred object where resolve can be called. //The context of this function and the first argument is the Deferred object where resolve can be called.
}); });
``` ```
> Note: `resolve` must be called on any deferred objects after the attribute has been validated or the main form validation will not complete.
### Ajax validation ### Ajax validation
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment