Created
August 12, 2016 04:42
-
-
Save goofmint/7056e7cd03efb799aba5022aff78fe2c to your computer and use it in GitHub Desktop.
1.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.formController.addRule({ | |
userId: { | |
customFunc: function(value) { | |
var dfd = h5.async.deferred(); | |
h5.ajax('existUser', { | |
// 非同期処理 | |
}).done(function(resp) { | |
// 入力値に問題なかった場合 | |
dfd.resolve({ | |
// 何かデータがあれば指定 | |
}); | |
// 入力値に問題があった場合 | |
dfd.reject({ | |
// 何かデータがあれば指定 | |
}); | |
}); | |
return dfd.promise(); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment