Skip to content

Conversation

@jschaedl
Copy link
Contributor

@jschaedl jschaedl commented Mar 31, 2019

Feature PR: symfony/symfony#28637

  • Positive
  • PositiveOrZero
  • Negative
  • NegativeOrZero

Todo:

  • find a better example for NegativeOrZero constraint

Copy link
Contributor

@OskarStark OskarStark left a comment

Choose a reason for hiding this comment

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

Thank you 👍🏻

I left some comments.

* Positive constraint
* PositiveOrZero constraint
* Negative constraint
* NegativeOrZero constraint
@jschaedl jschaedl force-pushed the validator-number_constraints branch from b4ca4a2 to 6155df4 Compare March 31, 2019 18:21
@OskarStark
Copy link
Contributor

Please include your new constraints in reference/constraints.rst, otherwise Sphinx won't be able to build the docs.

Parameter Description
============================= ================================================
``{{ compared_value }}`` Always zero
``{{ compared_value_type }}`` The expected value type
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if we should include compared_value and compared_value_type here. They are available, but it doesn't make so much sense to me to use them. WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure if we haven't added such (if available) parameters for other constraints.

Please help @xabbuh @javiereguiluz

Copy link
Member

Choose a reason for hiding this comment

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

Even if they won't be used frequently, for consistency with the other constraints I'd prefer to keep them. We always try to document all parameters. Thanks.

Copy link
Contributor

@OskarStark OskarStark left a comment

Choose a reason for hiding this comment

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

Great work, thank you! 👍

@javiereguiluz
Copy link
Member

@jschaedl thanks a lot for providing these docs (and the related feature too). Congrats on your first (great) Symfony Docs contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants