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
Add Image
validation rule
#670
Conversation
vjik
commented
Mar 23, 2024
Q | A |
---|---|
Is bugfix? | ❌ |
New feature? | ✔️ |
Breaks BC? | ❌ |
Fixed issues |
PR Summary
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 1.x #670 +/- ##
======================================
Coverage ? 94.94%
Complexity ? 835
======================================
Files ? 96
Lines ? 2553
Branches ? 0
======================================
Hits ? 2424
Misses ? 129
Partials ? 0 ☔ View full report in Codecov by Sentry. |
src/Rule/Image.php
Outdated
private ?int $maxWidth = null, | ||
private ?int $maxHeight = null, | ||
private string $notImageMessage = 'The value must be an image.', | ||
private string $notExactlyWidthMessage = 'The width of image "{attribute}" must be exactly {exactly, number} {exactly, plural, one{pixel} other{pixels}}.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Validating aspect ratio is quite a popular case too. Can be added iteratively in a separate PR.
Docs related additions - #671. |
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>