Skip to content

Commit 2db8430

Browse files
committed
docs: quick correction to avoid claiming that an Error is a string
1 parent c8d6acf commit 2db8430

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/schemaType.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ SchemaType.prototype.validateAll = function(validators) {
878878
*
879879
* schema.path('name').validate({
880880
* validator: function() { throw new Error('Oops!'); },
881-
* // `errors['name']` will be "Oops!"
881+
* // `errors['name'].message` will be "Oops!"
882882
* message: function(props) { return props.reason.message; }
883883
* });
884884
*

0 commit comments

Comments
 (0)