8000 Update validation.rst by ifdattic · Pull Request #4789 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Update validation.rst #4789

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 3 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
Prev Previous commit
Next Next commit
Update validation.rst
  • Loading branch information
ifdattic committed Jan 7, 2015
commit 59673ae3042fa0e217d10df17ebbe2027eee21e9
6 changes: 4 additions & 2 deletions book/validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ application. The goal of validation is to tell you if the data
of an object is valid. For this to work, you'll configure a list of rules
(called :ref:`constraints <validation-constraints>`) that the object must
follow in order to be valid. These rules can be specified via a number of
different formats (annotations, YAML, XML, or PHP).
different formats (annotations, YAML, XML or PHP).

For example, to guarantee that the ``$name`` property is not empty, add the
following:
Expand Down Expand Up @@ -341,7 +341,9 @@ constraint, have several configuration options available. Suppose that the
Acme\BlogBundle\Entity\Author:
properties:
gender:
- Choice: { choices: [male, female], message: Choose a valid gender. }
- Choice:
choices: [male, female]
message: Choose a valid gender.

.. code-block:: php-annotations

Expand Down
0