Skip to content

Use notFalsy and notNullType in the docs examples - #1860

Merged
alganet merged 1 commit into
Respect:mainfrom
NotAFlightRisk:docs/not-prefix-examples
Sep 21, 2026
Merged

alganet merged 1 commit into
Respect:mainfrom
NotAFlightRisk:docs/not-prefix-examples

Conversation

@NotAFlightRisk

Copy link
Copy Markdown
Contributor

Every example of the not prefix in the docs calls a rule that v3 hasn't got. v::notEmpty()->assert('hello') throws ComponentException: "notEmpty" is not a valid rule name, and v::notNull() does the same, so copying either off the page gets you an exception insted of the message it promises. Of the nine prefix sections on that page its the only one that doesn't run at all.

The migration guide already settles it: "NotEmpty renamed to Falsy", with v::notFalsy() as the prefixed shortcut. The generated mixins agree. src/Mixins/NotBuilder.php declares notFalsy() and notNullType(), and neither of the old names turns up anywhere in src/, so thats the pair I've gone with. The claimed output changes with it, v::notFalsy()->assert('') prints "" must not be falsy.

That same v::notEmpty() call is the placeholder pipes example in docs/feature-guide.md and docs/messages/placeholder-pipes.md, so those throw too. Their claimed output I've left alone, templated() overrides the rule's own message so The email field is required still prints.

@alganet

alganet commented Sep 21, 2026

Copy link
Copy Markdown
Member

Thanks for your contribution! 🐼

@alganet
alganet merged commit 17ab714 into Respect:main Sep 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants