Skip to content

Commit

Permalink
fix: updated custom validator typing (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
LiamMartens authored Mar 4, 2022
1 parent de37261 commit 9774605
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/schema/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ export interface BaseRule {
/**
* Creates a custom validation rule.
*/
custom: <T = any>(value: T) => true | string
custom: <T = any>(
validator: (value: T) => true | string | Promise<true | string>
) => this
/**
* Ensures that this field exists.
*/
Expand Down

0 comments on commit 9774605

Please sign in to comment.