Skip to content

[WCM] [Validator] Added DateTimeRangeValidator #3019

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 1 commit into from
Closed

[WCM] [Validator] Added DateTimeRangeValidator #3019

wants to merge 1 commit into from

Conversation

FineWolf
Copy link

Q A
Doc fix? no
New docs? yes (symfony/symfony#9164)
Applies to 2.4+
Fixed tickets

This adds a new validator to verify if a DateTime is between an optional min or max. Essentially, it is the Range validator for DateTime.

Basic Usage
-----------

To verify that the "date" field of a class is between October 1st 2013 and November 1st 2013, you might add the following:
Copy link
Member

Choose a reason for hiding this comment

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

you should break the line after the first word that crosses the 72th character

@FineWolf
Copy link
Author

@wouterj : Changes made as per commented.

min
~~~

**type**: ``DateTime|string`` [:ref:`default option<validation-default-option>`]
Copy link
Member

Choose a reason for hiding this comment

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

there should be a space before the open angle bracket

@xabbuh
Copy link
Member

xabbuh commented Oct 4, 2013

The document needs also be referenced in ``reference/constraints.rst`.

@FineWolf FineWolf closed this Oct 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants