Skip to content

feat(validation): add closure-based validation#1828

Merged
brendt merged 8 commits intotempestphp:3.xfrom
MohammadAlhallaq:validation-rules-based-on-closures
Jan 8, 2026
Merged

feat(validation): add closure-based validation#1828
brendt merged 8 commits intotempestphp:3.xfrom
MohammadAlhallaq:validation-rules-based-on-closures

Conversation

@MohammadAlhallaq
Copy link
Contributor

@MohammadAlhallaq MohammadAlhallaq changed the title feat{validation): Validation rules based on closures feat(validation): Validation rules based on closures Dec 21, 2025
@MohammadAlhallaq MohammadAlhallaq changed the title feat(validation): Validation rules based on closures feat(validation): validation rules based on closures Dec 21, 2025
@innocenzi innocenzi requested a review from brendt December 30, 2025 20:32
@innocenzi innocenzi changed the title feat(validation): validation rules based on closures feat(validation): add Closure rule Dec 30, 2025
@innocenzi
Copy link
Member

A few things:

  • The name of the attribute/rule should be something more explicit that "Closure"
  • There should be a test with a class and a property actually using the rule
  • As I said in the issue, I really don't think this is a good pattern that we should promote by supporting it

@MohammadAlhallaq
Copy link
Contributor Author

MohammadAlhallaq commented Dec 30, 2025

A few things:

  • The name of the attribute/rule should be something more explicit that "Closure"
  • There should be a test with a class and a property actually using the rule
  • As I said in the issue, I really don't think this is a good pattern that we should promote by supporting it

Yeah, I was planning to revisit it today, I’ll take care of the first two points, and we can wait for brendt's review.

@innocenzi innocenzi changed the title feat(validation): add Closure rule feat(validation): add closure-based validation Jan 5, 2026
@brendt brendt merged commit b6d4668 into tempestphp:3.x Jan 8, 2026
74 checks passed
@brendt
Copy link
Member

brendt commented Jan 8, 2026

Perfect, thanks!

@muhammadHallaq muhammadHallaq mentioned this pull request Jan 8, 2026
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.

3 participants