This commit is contained in:
syuilo
2018-04-24 23:34:18 +09:00
parent 070cd52c21
commit 1a13c7e0b1
8 changed files with 11 additions and 10 deletions

View File

@@ -19,7 +19,7 @@ export default class ID extends Query<mongo.ObjectID> {
}
};
this.pushFirstTimeValidator(v => {
this.pushValidator(v => {
if (!mongo.ObjectID.prototype.isPrototypeOf(v) && isNotAnId(v)) {
return new Error('must-be-an-id');
}