File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ You can implement custom format validators and use them in your schema files. Yo
159
159
160
160
$generator = new Generator(
161
161
(new GeneratorConfiguration())
162
- ->addFormat(new MyCustomFormat())
162
+ ->addFormat('customFormat', new MyCustomFormat())
163
163
);
164
164
165
165
Your format validator must implement the interface **PHPModelGenerator\\ Format\\ FormatValidatorInterface **.
@@ -170,7 +170,7 @@ If your custom format is representable by a regular expression you can bypass im
170
170
171
171
$generator = new Generator(
172
172
(new GeneratorConfiguration())
173
- ->addFormat(new FormatValidatorFromRegEx('/^\d*$/'))
173
+ ->addFormat('numeric', new FormatValidatorFromRegEx('/^\d*$/'))
174
174
);
175
175
176
176
.. hint ::
You can’t perform that action at this time.
0 commit comments