Skip to content

Commit

Permalink
Merge pull request #5178 from milesbarr/patch-1
Browse files Browse the repository at this point in the history
Update schematype.js
  • Loading branch information
vkarpov15 committed Apr 22, 2017
2 parents 159ac94 + 7f6d459 commit 2fcd595
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/schematype.js
Expand Up @@ -419,9 +419,8 @@ SchemaType.prototype.get = function(fn) {
*
* // Can also return a promise
* schema.path('name').validate({
* isAsync: true,
* validator: function (value, respond) {
* return new Promise(resolve => {
* validator: function (value) {
* return new Promise(function (resolve, reject) {
* resolve(false); // validation failed
* });
* }
Expand Down

0 comments on commit 2fcd595

Please sign in to comment.