-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
[Validator] Add shorter examples using the default option #6597
Conversation
alexmart
commented
May 21, 2016
Q | A |
---|---|
Doc fix? | no |
New docs? | no |
Applies to | >= 2.3 |
Fixed tickets | #4144 |
|
||
class Author | ||
{ | ||
/** | ||
* @Assert\Type( | ||
* type="integer", | ||
* message="The value {{ value }} is not a valid {{ type }}." |
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.
I think you can still use the "default" option version - i.e.:
/**
* @Assert\Type("integer", message="The value..")
*/
Obviously, this doesn't apply to all formats (like YAML)
I made some new changes. Already spotted some formatting mistakes. @weaverryan regarding your previous comment, should I add the message part for the simple examples? I thought the idea is to show the simplest thing that works. |
than ``18``, you could do the following: | ||
The following constraints ensure that: | ||
- the number of ``siblings`` of a ``Person`` is greater than ``5`` | ||
- the ``age`` of a ``Person`` class is greater than ``18`` |
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 commonly use *
as list indicator (can be fixed during the merge though)
👍 I like it a lot Status: Reviewed |
If you want to ensure that the ``age`` of a ``Person`` class is greater | ||
than ``18``, you could do the following: | ||
The following constraints ensure that: | ||
- the number of ``siblings`` of a ``Person`` is greater than ``5`` |
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.
… (alexmart) This PR was submitted for the 2.3 branch but it was merged into the 2.7 branch instead (closes #6597). Discussion ---------- [Validator] Add shorter examples using the default option | Q | A | ------------- | --- | Doc fix? | no | New docs? | no | Applies to | >= 2.3 | Fixed tickets | #4144 Commits ------- d3cde84 [Validator] Add shorter examples using the default option
* 2.7: [#6597] some tweaks [Validator] Add shorter examples using the default option Typo fix Updated the CS rule about return null; and return; Update date.rst - Fixes typo NullOutput should be passed to $command->run() Hard values for the driver option
* 2.8: [#6597] some tweaks [Validator] Add shorter examples using the default option Typo fix Add missing parameter Updated the CS rule about return null; and return; [#6690] fix syntax error Update date.rst - Fixes typo [#6690] add versionadded directive Added an example for a different method of verbosity level usage. NullOutput should be passed to $command->run() Hard values for the driver option Fix ldap security examples
* 3.0: [#6597] some tweaks [Validator] Add shorter examples using the default option Typo fix Add missing parameter Updated the CS rule about return null; and return; [#6690] fix syntax error Update date.rst - Fixes typo [#6690] add versionadded directive Added an example for a different method of verbosity level usage. NullOutput should be passed to $command->run() Hard values for the driver option Fix ldap security examples
* 3.1: [#6597] some tweaks [Validator] Add shorter examples using the default option Typo fix Added the documentation for the Cache component Add missing parameter Updated the CS rule about return null; and return; [#6690] fix syntax error Update date.rst - Fixes typo [#6690] add versionadded directive Added an example for a different method of verbosity level usage. NullOutput should be passed to $command->run() Hard values for the driver option Fix ldap security examples
Thanks everybody for helping me with my first contribution! |
@alexmart We are happy to have you onboard. Hope we see you again with some other nice contribution. :) |