Skip to content

Conversation

@alganet
Copy link
Member

@alganet alganet commented Feb 3, 2026

This validator is not so much about how we present the input during error messages, but in what format data already is formatted.

@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.54%. Comparing base (16148e9) to head (a279ae4).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #1673   +/-   ##
=========================================
  Coverage     99.53%   99.54%           
- Complexity      928      932    +4     
=========================================
  Files           190      191    +1     
  Lines          2169     2182   +13     
=========================================
+ Hits           2159     2172   +13     
  Misses           10       10           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alganet alganet marked this pull request as ready for review February 4, 2026 13:27
@alganet alganet requested a review from Copilot February 4, 2026 13:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds a new Format validator that checks whether input data is already formatted in a specific way. The validator accepts a Formatter from the Respect\StringFormatter library and validates that applying the formatter to the input produces the same result as the input itself.

Changes:

  • Adds new Format validator class with formatter-based validation logic
  • Adds comprehensive unit and feature tests covering various formatting scenarios
  • Updates all mixin interfaces (Builder, Chain, and their prefixed variants) to include the new validator
  • Adds documentation and examples for the Format validator
  • Adds FormatterBuilder alias as 'f' in aliases.php

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Validators/Format.php Core validator implementation that compares input with formatted output
tests/unit/Validators/FormatTest.php Unit tests with valid/invalid input providers
tests/feature/Validators/FormatTest.php Feature tests covering various usage scenarios
src/Mixins/*.php Interface updates adding format methods to all mixin chains
docs/validators/Format.md Complete validator documentation with examples
docs/validators.md Updates to include Format in validator lists
aliases.php Adds 'f' alias for FormatterBuilder

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

This validator is not so much about how we present the input
during error messages, but in what format data already is formatted.
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.

1 participant