Skip to content

Commit cee5815

Browse files
committed
fixed example in config.ts
1 parent b51cb07 commit cee5815

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/config.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ export interface ValidationSchemaPluginConfig extends TypeScriptPluginConfig {
9595
* constraint:
9696
* minLength: min # same as ['min', '$1']
9797
* maxLength: max
98-
* startsWith: ["matches", "^$1"]
99-
* endsWith: ["matches", "$1$"]
100-
* contains: ["matches", "$1"]
101-
* notContains: ["matches", "^((?!$1).)*$"]
102-
* pattern: matches
98+
* startsWith: ["matches", "/^$1/"]
99+
* endsWith: ["matches", "/$1$/"]
100+
* contains: ["matches", "/$1/"]
101+
* notContains: ["matches", "/^((?!$1).)*$/"]
102+
* pattern: ["matches", "/$1/"]
103103
* format:
104104
* # For example, `@constraint(format: "uri")`. this case $1 will be "uri".
105105
* # Therefore the generator generates yup schema `.url()` followed by `uri: 'url'`

0 commit comments

Comments
 (0)