Skip to content
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

Introduce DateComparison validator #275

Merged
merged 5 commits into from
Jun 25, 2024
Merged

Conversation

gsteel
Copy link
Member

@gsteel gsteel commented Jun 20, 2024

Q A
Documentation yes
New Feature yes

Description

Validates that a date instance or string is between, after or before given boundaries.

Supports standard string formats returned by HTML forms so that validation aligns with W3C spec.

Further ref #272, #274

src/DateComparison.php Outdated Show resolved Hide resolved
src/DateComparison.php Show resolved Hide resolved
src/ValidatorPluginManager.php Outdated Show resolved Hide resolved
Validates that a date instance or string is between, after or before given boundaries

Signed-off-by: George Steel <george@net-glue.co.uk>
Signed-off-by: George Steel <george@net-glue.co.uk>
Signed-off-by: George Steel <george@net-glue.co.uk>
Copy link
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

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

LGTM, but would like @froschdesign's opinion first :)

Co-authored-by: Frank Brückner <info@froschdesignstudio.de>
Signed-off-by: George Steel <george@netglue.uk>
test/DateComparisonTest.php Show resolved Hide resolved
test/DateComparisonTest.php Show resolved Hide resolved
test/DateComparisonTest.php Show resolved Hide resolved
Signed-off-by: George Steel <george@net-glue.co.uk>
@gsteel
Copy link
Member Author

gsteel commented Jun 25, 2024

Thank you for the reviews @froschdesign and @Ocramius 👍

@gsteel gsteel assigned gsteel and unassigned froschdesign Jun 25, 2024
@gsteel gsteel merged commit 432d30a into laminas:2.60.x Jun 25, 2024
14 of 15 checks passed
@gsteel gsteel deleted the v2/date-comparison branch June 25, 2024 12:56
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.

None yet

3 participants