From 25efe0de4cfbd1fa6d259785e41f01fa75f5b424 Mon Sep 17 00:00:00 2001 From: Iain Date: Mon, 21 Sep 2026 13:54:48 +0100 Subject: [PATCH] Use notFalsy and notNullType in the docs examples --- docs/feature-guide.md | 2 +- docs/messages/placeholder-pipes.md | 2 +- docs/prefixes.md | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/feature-guide.md b/docs/feature-guide.md index 08c25891e..30b48bb96 100644 --- a/docs/feature-guide.md +++ b/docs/feature-guide.md @@ -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 diff --git a/docs/messages/placeholder-pipes.md b/docs/messages/placeholder-pipes.md index d8550eeef..33973a5a8 100644 --- a/docs/messages/placeholder-pipes.md +++ b/docs/messages/placeholder-pipes.md @@ -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 diff --git a/docs/prefixes.md b/docs/prefixes.md index ecf576e5b..fc358b653 100644 --- a/docs/prefixes.md +++ b/docs/prefixes.md @@ -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`