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

Enhance Email and Image Dimensions Validation Tests #54897

Merged
merged 2 commits into from
Mar 4, 2025

Conversation

alikhosravidev
Copy link
Contributor

This pull request adds additional test cases to improve the coverage of email validation and image dimensions validation in Laravel.

Changes include:
✅ Enhancements in ValidationEmailRuleTest

Added test cases in testBasic to ensure email validation correctly handles:

  • Non-string values such as integers.
  • Arrays containing valid email addresses.

✅ Enhancements in ValidationDimensionsRuleTest

  • Added testItCorrectlyFormatsWithSpecialValues to validate the correct string format of dimension rules, including negative values.
  • Added testDimensionsRuleMaintainsCorrectOrder to ensure the order of width constraints is preserved.
  • Added testOverridingValues to verify that repeated width constraints correctly override previous values.
  • Added testRatioBetweenOverridesMinAndMaxRatio to confirm that ratioBetween() correctly overrides minRatio() and maxRatio().

These tests strengthen the reliability of Laravel’s validation rules for both email and image dimensions. 🚀

@taylorotwell taylorotwell merged commit 88b7160 into laravel:12.x Mar 4, 2025
40 of 41 checks passed
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