From e8ac76dbcf18f24ae50b8ac05aa8375952aabf6f Mon Sep 17 00:00:00 2001 From: Sobit Akhmedov Date: Tue, 2 Jun 2015 19:03:21 +0200 Subject: [PATCH] add optional() method to Validator interface --- express-validator/express-validator.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/express-validator/express-validator.d.ts b/express-validator/express-validator.d.ts index 7fc04f70ee..428c90afd0 100644 --- a/express-validator/express-validator.d.ts +++ b/express-validator/express-validator.d.ts @@ -150,6 +150,10 @@ declare module ExpressValidator { * Will work against Visa, MasterCard, American Express, Discover, Diners Club, and JCB card numbering formats */ isCreditCard(): Validator; + /** + * Check an input only when the input exists + */ + optional(): Validator; } interface Sanitizer {