Skip to content

Commit

Permalink
add optional() method to Validator interface
Browse files Browse the repository at this point in the history
  • Loading branch information
sobit committed Jun 2, 2015
1 parent 484544d commit e8ac76d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions express-validator/express-validator.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e8ac76d

Please sign in to comment.