Skip to content

Clarify the mappings that require no method prefix. #7131

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

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -639,9 +639,9 @@ Now, create the ``isPasswordLegal()`` method and include the logic you need::
.. note::

The keen-eyed among you will have noticed that the prefix of the getter
("get", "is" or "has") is omitted in the mapping. This allows you to move
the constraint to a property with the same name later (or vice versa)
without changing your validation logic.
("get", "is" or "has") is omitted in the mappings for YAML, XML and PHP.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would change this a bit to "[...] is omitted in the mappings for the YAML, XML and PHP format."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, will do. Do you want a separate "change" commit or happy for it to be merged into the existing single one?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can do what fits your workflow best. :) We have a nice tool that allows use to squash commits during merging PRs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't matter because we use a tool that squashes everything automatically, so your pull request will be merged as a single commit :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! I'll push a revision then and let your magic tool do the job for me :-)

This allows you to move the constraint to a property with the same name
later (or vice versa) without changing your validation logic.

.. _validation-class-target:

Expand Down