-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Validation] Add "hasser" support #3418
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -586,6 +586,9 @@ allows you to add a constraint to any public method whose name starts with | |
"get", "is" or "has". In this guide, these types of methods are referred to | ||
as "getters". | ||
|
||
.. versionadded:: 2.5 | ||
Support for methods starting with ``has`` is new in Symfony 2.5. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. was introduced in Symfony 2.5. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does it makes sense to also fix the wording in 2.3 and 2.4, or is it a new convention? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's a new convention and as the versionadded directives are removed quite quickly, we decided not to invest time in updating the others. We can better document the missing things! 👏 |
||
|
||
The benefit of this technique is that it allows you to validate your object | ||
dynamically. For example, suppose you want to make sure that a password field | ||
doesn't match the first name of the user (for security reasons). You can | ||
|
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.
we need a
versionadded
directive for the "hasser" supportThere 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.
I've added this yesterday, see commit below.