Skip to content

Commit f05ebf2

Browse files
committed
Update Callback type hint
1 parent f273cfe commit f05ebf2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/types/index.d.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ export interface ValidatorJSAsserts {
6060
/** Valid Canadian ZIP code (postal code). */
6161
caZipCode(): AssertInstance;
6262

63-
/** Run a custom callback function, passing a custom class name. */
63+
/**
64+
* Run a custom callback function, passing a custom class name.
65+
* - Class names must match the pattern `/^[a-zA-Z\d]+$/`.
66+
*/
6467
callback(fn: (value: unknown) => boolean, customClass: string): AssertInstance;
6568

6669
/** Valid Brazilian CPF number. @requires cpf */

0 commit comments

Comments
 (0)