Skip to content

Fix the inverted hasFailed() description and example in the docs - #1872

Merged
alganet merged 1 commit into
Respect:mainfrom
NotAFlightRisk:docs/hasfailed-returns-true-on-failure
Oct 2, 2026
Merged

alganet merged 1 commit into
Respect:mainfrom
NotAFlightRisk:docs/hasfailed-returns-true-on-failure

Conversation

@NotAFlightRisk

Copy link
Copy Markdown
Contributor

The "Validating arrays of items" example on the handling results page prints nothing as written, even though the second item in its list has a number for a name and a negative price. The hasFailed() check in the loop has a ! it shouldnt. Near the top of the page the description of hasFailed() is backwards the same way, "true if validation passed". The two sample lines under it are right, I ran them.

Take the ! of and the example prints

Item 1 has errors: `.1.name` must be a string

@alganet
alganet merged commit 10f7787 into Respect:main Oct 2, 2026
2 checks passed
@alganet

alganet commented Oct 2, 2026

Copy link
Copy Markdown
Member

Thanks for the contribution! 🐼

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