Skip to content

Implement .bail()#751

Merged
gustavohenke merged 3 commits intomasterfrom
bail
Aug 16, 2019
Merged

Implement .bail()#751
gustavohenke merged 3 commits intomasterfrom
bail

Conversation

@gustavohenke
Copy link
Copy Markdown
Member

Supersedes #500

Stops validation if there's an error.
Logic for stopping validation reused from conditional validation, in #658.

@coveralls
Copy link
Copy Markdown

coveralls commented Jul 29, 2019

Coverage Status

Coverage remained the same at 100.0% when pulling ec117c4 on bail into 9161b67 on master.

@gustavohenke gustavohenke merged commit d072629 into master Aug 16, 2019
@gustavohenke gustavohenke deleted the bail branch August 16, 2019 12:28
@gustavohenke
Copy link
Copy Markdown
Member Author

This is out with v6.2.0! 🚢

@jonterry-sans
Copy link
Copy Markdown

jonterry-sans commented Sep 11, 2019

@gustavohenke
I can't seem to get bail working personally.

check("accountId").exists()
    .isString()
    .withMessage(" not a string")
    .isUUID("4")
    .withMessage("Is not v4 uuid")
    .bail()
    .trim()
    .customSanitizer((value): string => value.toLowerCase())

@gustavohenke
Copy link
Copy Markdown
Member Author

Hey @jonterry-sans please open a new issue with all details you can provide.

@lock
Copy link
Copy Markdown

lock bot commented Nov 10, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants