Skip to content

2.3 only - Collection of minor fixes #3177

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

Merged
merged 1 commit into from
Nov 12, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
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 reference/constraints/Collection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,13 @@ the above example, the ``allowMissingFields`` option was set to true, meaning
that if either of the ``personal_email`` or ``short_bio`` elements were missing
from the ``$personalData`` property, no validation error would occur.

Required and Optional Field Constraints
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 2.3
The ``Required`` and ``Optional`` constraints were moved to the namespace
``Symfony\Component\Validator\Constraints\`` in Symfony 2.3.

Required and Optional Field Constraints
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Constraints for fields within a collection can be wrapped in the ``Required`` or
``Optional`` constraint to control whether they should always be applied (``Required``)
or only applied when the field is present (``Optional``).
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/EqualTo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,6 @@ Options
message
~~~~~~~

**type**: ``string`` **default**: ``This value should be equal to {{ compared_value }}``
**type**: ``string`` **default**: ``This value should be equal to {{ compared_value }}.``

This is the message that will be shown if the value is not equal.
2 changes: 1 addition & 1 deletion reference/constraints/GreaterThan.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Options
message
~~~~~~~

**type**: ``string`` **default**: ``This value should be greater than {{ compared_value }}``
**type**: ``string`` **default**: ``This value should be greater than {{ compared_value }}.``

This is the message that will be shown if the value is not greater than the
comparison value.
2 changes: 1 addition & 1 deletion reference/constraints/GreaterThanOrEqual.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Options
message
~~~~~~~

**type**: ``string`` **default**: ``This value should be greater than or equal to {{ compared_value }}``
**type**: ``string`` **default**: ``This value should be greater than or equal to {{ compared_value }}.``

This is the message that will be shown if the value is not greater than or equal
to the comparison value.
2 changes: 1 addition & 1 deletion reference/constraints/IdenticalTo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,6 @@ Options
message
~~~~~~~

**type**: ``string`` **default**: ``This value should be identical to {{ compared_value_type }} {{ compared_value }}``
**type**: ``string`` **default**: ``This value should be identical to {{ compared_value_type }} {{ compared_value }}.``

This is the message that will be shown if the value is not identical.
10 changes: 6 additions & 4 deletions reference/constraints/Isbn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Isbn
.. versionadded:: 2.3
The Isbn constraint was added in Symfony 2.3.

This constraint validates that an ISBN (International Standard Book Numbers)
number is either a valid ISBN-10, a valid ISBN-13 or both.
This constraint validates that an `International Standard Book Number (ISBN)`_
is either a valid ISBN-10, a valid ISBN-13 or both.

+----------------+----------------------------------------------------------------------+
| Applies to | :ref:`property or method<validation-property-target>` |
Expand Down Expand Up @@ -98,15 +98,15 @@ Available Options
isbn10
~~~~~~

**type**: ``boolean`` [:ref:`default option<validation-default-option>`]
**type**: ``boolean``

If this required option is set to ``true`` the constraint will check if the
code is a valid ISBN-10 code.

isbn13
~~~~~~

**type**: ``boolean`` [:ref:`default option<validation-default-option>`]
**type**: ``boolean``

If this required option is set to ``true`` the constraint will check if the
code is a valid ISBN-13 code.
Expand Down Expand Up @@ -134,3 +134,5 @@ bothIsbnMessage

The message that will be shown if both the `isbn10`_ and `isbn13`_ options
are true and the given value does not pass the ISBN-13 nor the ISBN-13 check.

.. _`International Standard Book Number (ISBN)`: http://en.wikipedia.org/wiki/Isbn
6 changes: 3 additions & 3 deletions reference/constraints/Issn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ Issn
====

.. versionadded:: 2.3
The ISSN validation is new in Symfony 2.3.
The Issn constraint was added in Symfony 2.3.

Validates that a value is a valid `ISSN`_.
Validates that a value is a valid `International Standard Serial Number (ISSN)`_.

+----------------+-----------------------------------------------------------------------+
| Applies to | :ref:`property or method<validation-property-target>` |
Expand Down Expand Up @@ -97,5 +97,5 @@ requireHyphen
The validator will allow non hyphenated ISSN values by default. When switching
this to ``true``, the validator requires a hyphenated ISSN value.

.. _`ISSN`: http://en.wikipedia.org/wiki/Issn
.. _`International Standard Serial Number (ISSN)`: http://en.wikipedia.org/wiki/Issn

2 changes: 1 addition & 1 deletion reference/constraints/LessThan.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Options
message
~~~~~~~

**type**: ``string`` **default**: ``This value should be less than {{ compared_value }}``
**type**: ``string`` **default**: ``This value should be less than {{ compared_value }}.``

This is the message that will be shown if the value is not less than the
comparison value.
2 changes: 1 addition & 1 deletion reference/constraints/LessThanOrEqual.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Options
message
~~~~~~~

**type**: ``string`` **default**: ``This value should be less than or equal to {{ compared_value }}``
**type**: ``string`` **default**: ``This value should be less than or equal to {{ compared_value }}.``

This is the message that will be shown if the value is not less than or equal
to the comparison value.
2 changes: 1 addition & 1 deletion reference/constraints/NotEqualTo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,6 @@ Options
message
~~~~~~~

**type**: ``string`` **default**: ``This value should not be equal to {{ compared_value }}``
**type**: ``string`` **default**: ``This value should not be equal to {{ compared_value }}.``

This is the message that will be shown if the value is equal.
2 changes: 1 addition & 1 deletion reference/constraints/NotIdenticalTo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,6 @@ Options
message
~~~~~~~

**type**: ``string`` **default**: ``This value should not be identical to {{ compared_value_type }} {{ compared_value }}``
**type**: ``string`` **default**: ``This value should not be identical to {{ compared_value_type }} {{ compared_value }}.``

This is the message that will be shown if the value is not equal.
2 changes: 1 addition & 1 deletion reference/constraints/_comparison-value-option.rst.inc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
value
~~~~~

**type**: ``mixed``
**type**: ``mixed`` [:ref:`default option<validation-default-option>`]

This option is required. It defines the value to compare to. It can be a
string, number or object.
2 changes: 1 addition & 1 deletion reference/forms/twig_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ the other helpers to render individual parts of the form instead:
{{ form_row(form.name) }}
{{ form_row(form.dueDate) }}

<input type="submit" value="Submit me"/>
{{ form_row(form.submit, { 'label': 'Submit me' }) }}
{{ form_end(form) }}

.. _reference-forms-twig-start:
Expand Down