Skip to content

Commit

Permalink
array of class readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Triplkrypl committed Aug 21, 2024
1 parent e6c94a1 commit 1225c21
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,11 @@ final class YourClassRule implements \SimpleAsFuck\Validator\Rule\Custom\UserCla
}
}

$object = new \stdClass();
/** @var mixed $data */

$rules = \SimpleAsFuck\Validator\Factory\Validator::make($object);
$rules = \SimpleAsFuck\Validator\Factory\Validator::make($data);

$yourObject = $rules->object()->class(new YourClassRule())->notNull();
$yourObjects = $rules->array()->ofClass(new YourClassRule())->notNull();

```

0 comments on commit 1225c21

Please # to comment.