Skip to content

Commit 8b1f30d

Browse files
committed
readme improvement
1 parent ecfed4b commit 8b1f30d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,10 @@ $someQueryValidValue = $rules->query()->key('someKey')->string()->parseInt()->mi
230230

231231
// validate something from request body with json format
232232
$someJsonValidValue = $rules->json()->object()->property('someProperty')->string()->notEmpty()->max(255)->notNull();
233+
/**
234+
* @var \SimpleAsFuck\Validator\Rule\Custom\UserClassRule<YourClass> $yourClassRule
235+
*/
236+
$yourModelFromRequestBody = $rules->json()->object()->class($yourClassRule)->notNull();
233237

234238

235239

0 commit comments

Comments
 (0)