Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 65f46a3

Browse files
committed
docs: removed dependency injection examples from get started
1 parent 45abd30 commit 65f46a3

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

docs/01-get-started.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,10 @@ Simple usage looks like:
3030
use ProgrammatorDev\Validator\Rule;
3131
use ProgrammatorDev\Validator\Validator;
3232

33-
// Do this...
33+
// do this...
3434
$validator = Validator::notBlank()->greaterThanOrEqual(18);
3535

36-
// Or this...
37-
$validator = new Validator(
38-
new Rule\NotBlank(),
39-
new Rule\GreaterThanOrEqual(18)
40-
);
41-
42-
// Validate with these:
36+
// ...and validate with these:
4337
$validator->validate(16); // returns bool: false
4438
$validator->assert(16, 'age'); // throws exception: The age value should be greater than or equal to 18, 16 given.
4539
```

0 commit comments

Comments
 (0)