Permalink
Browse files

Merge pull request #310 from kacepe/patch-1

Allow to use fully custom error formatter without typescript error.
  • Loading branch information...
2 parents 6652e04 + a6f689d commit 841944e40b5bbc48aa5a92287ccb8436b26e9e5c @gustavohenke gustavohenke committed on GitHub Mar 6, 2017
Showing with 2 additions and 2 deletions.
  1. +2 −2 index.d.ts
View
@@ -1,6 +1,6 @@
// Type definitions for express-validator 3.0.0
// Project: https://github.com/ctavan/express-validator
-// Definitions by: Ayman Nedjmeddine <https://github.com/IOAyman>, Nathan Ridley <https://github.com/axefrog/>, Jonathan Häberle <http://dreampulse.de>, Peter Harris <https://github.com/codeanimal/>
+// Definitions by: Ayman Nedjmeddine <https://github.com/IOAyman>, Nathan Ridley <https://github.com/axefrog/>, Jonathan Häberle <http://dreampulse.de>, Peter Harris <https://github.com/codeanimal/>, Kacper Polak <kacper@hypequality.com>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
///<reference types="express"/>
@@ -297,7 +297,7 @@ declare namespace ExpressValidator.Options {
export interface ExpressValidatorOptions {
customValidators?: { [validatorName: string]: (...value: any[]) => boolean }
customSanitizers?: { [sanitizername: string]: (value: any) => any }
- errorFormatter?: (param: string, msg: string, value: any) => {param: string, msg: string, value: any}
+ errorFormatter?: (param?: string, msg?: string, value?: any) => any
}

0 comments on commit 841944e

Please sign in to comment.