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

Validate date intervals - start date must be before end date #124

Open
wants to merge 3 commits into
base: 2.x
Choose a base branch
from

Conversation

AronNovak
Copy link

GitHub Issue:
#123

What does this Pull Request do?

Adds stricter validation for date ranges, start date should be earlier than end date.

What's new?

It validates date intervals for EDTF fields, so previously accepted (but incorrect) date entries could become suddenly not accepted by this change.

Interested parties

@Islandora/committers

@AronNovak AronNovak changed the title Validate date intervals Validate date intervals - start date must be before end date Jun 13, 2024
@seth-shaw-asu seth-shaw-asu self-assigned this Jun 19, 2024
@seth-shaw-asu
Copy link
Member

Tests are failing because the item you added is processed with the "intervals" parameter of validate() set to FALSE.

See https://github.com/Islandora/controlled_access_terms/blob/2.x/src/EDTFUtils.php#L132 and https://github.com/Islandora/controlled_access_terms/blob/2.x/tests/src/Kernel/EdtfUtilsTest.php#L59.

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.

2 participants