Skip to content

Commit

Permalink
docs: fix JS example in "manually running"
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavohenke committed May 18, 2024
1 parent b182989 commit ce3a4a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/guides/manually-running.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const validate = validations => {
// sequential processing, stops running validations chain if one fails.
for (const validation of validations) {
const result = await validation.run(req);
if (result.isEmpty()) {
if (!result.isEmpty()) {
return res.status(400).json({ errors: result.array() });
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const validate = validations => {
// sequential processing, stops running validations chain if one fails.
for (const validation of validations) {
const result = await validation.run(req);
if (result.isEmpty()) {
if (!result.isEmpty()) {
return res.status(400).json({ errors: result.array() });
}
}
Expand Down

0 comments on commit ce3a4a3

Please sign in to comment.