Skip to content

Fix #2337: Enforce future dates for Pet Visits#2342

Open
ahmedAlweimine wants to merge 2 commits intospring-projects:mainfrom
ahmedAlweimine:fix-2337
Open

Fix #2337: Enforce future dates for Pet Visits#2342
ahmedAlweimine wants to merge 2 commits intospring-projects:mainfrom
ahmedAlweimine:fix-2337

Conversation

@ahmedAlweimine
Copy link
Copy Markdown

Visit.java: Updated constructor to default to tomorrow's date and added @future constraint.

VisitController.java: Added manual backend check to reject dates not in the future.

HTML: Enhanced inputField.html fragment to support min attribute and updated createOrUpdateVisitForm.html to enforce it.

Tests: Comprehensive unit and integration tests added to verify validation logic and error messages.

VisitControllerTests.java: Added both positive (success) and negative (error) test cases for visit dates.

ValidatorTests.java: Added verification to ensure the @future constraint triggers correctly.

Fix 2337 Enforce future dates for Pet Visits

Signed-off-by: AhmedBabaAlweimine <ahmedouldbaba4@gmail.com>
Signed-off-by: AhmedBabaAlweimine <ahmedouldbaba4@gmail.com>
Copy link
Copy Markdown

@marcosgdz03 marcosgdz03 left a comment

Choose a reason for hiding this comment

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

I have seen and it's all okay

@ahmedAlweimine
Copy link
Copy Markdown
Author

Thanks for the review, @marcosgdz03 , This was a great first experience contributing to the project. I'm looking forward to the merge and hopefully tackling more issues in the future.

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