Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/feature-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ Placeholder pipes allow you to customize how values are rendered in error messag
```php
v::templated(
'The {{field|raw}} field is required',
v::notEmpty(),
v::notFalsy(),
['field' => 'email'],
)->assert('');
// → The email field is required
Expand Down
2 changes: 1 addition & 1 deletion docs/messages/placeholder-pipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ To use a placeholder pipe, modify your placeholder like this: `{{placeholder|mod
```php
v::templated(
'The {{field|raw}} field is required',
v::notEmpty(),
v::notFalsy(),
['field' => 'email'],
)->assert('');
// → The email field is required
Expand Down
10 changes: 5 additions & 5 deletions docs/prefixes.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ v::minGreaterThan(0)->assert([0, 1, 2]);

Any method starting with `not` will be transformed into `v::not(v::remainingPart())`.

- `v::notEmpty()` → `v::not(v::empty())`
- `v::notNull()` → `v::not(v::null())`
- `v::notFalsy()` → `v::not(v::falsy())`
- `v::notNullType()` → `v::not(v::nullType())`

```php
v::notEmpty()->assert('hello')
v::notFalsy()->assert('hello')
// Validation passes successfully

v::notEmpty()->assert('');
// → The value must not be empty
v::notFalsy()->assert('');
// → "" must not be falsy
```

### `nullOr`
Expand Down
Loading