Skip to content

Commit acbcd67

Browse files
author
陈宁
committed
fix RuleItem.pattern type
1 parent d3a09b5 commit acbcd67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ declare module 'async-validator' {
4141
interface RuleItem {
4242
type?: RuleType; // default type is 'string'
4343
required?: boolean;
44-
pattern?: string;
44+
pattern?: RegExp | string;
4545
min?: number; // Range of type 'string' and 'array'
4646
max?: number; // Range of type 'string' and 'array'
4747
len?: number; // Length of type 'string' and 'array'

0 commit comments

Comments
 (0)