-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Tweak the IsTrue validation docs #12712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
reference/constraints/IsTrue.rst
Outdated
@@ -113,7 +112,9 @@ Then you can constrain this method with ``IsTrue``. | |||
} | |||
} | |||
|
|||
If the ``isTokenValid()`` returns false, the validation will fail. | |||
If the ``isTokenValid()`` returns false, the validation will fail. When applied | |||
to methods, this constraint requires method names to start with ``is`` or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not look right to me. Is this based on some bug report?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original doc said that this works with "a "getter" method" But what's that? Only getters? Because I know that it works for issers too ... so, getters + issers only? Or does this work with ANY kind of method regardless of its name? Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works with an method that returns a boolean value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying this. I've updated the description.
7ccf167
to
c47d8ae
Compare
Please review that this is correct: IsTrue requires that method names start with "is" or "get" Thanks!