How to write rule for validating collections?
See original GitHub issuecase class Customer(id: Int, name: String)
case class CustomerCollection(customers: Vector[Customer])
implicit val customerValidator: AsyncValidator[CustomerCollection] =
AsyncValidator[CustomerCollection]
.async.rule(_.customers, ....)
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
What is a debt collection validation notice?
If you do dispute the debt in writing within 30 days the debt collector must stop collection until it provides you verification of...
Read more >Collections — FluentValidation documentation
You can use the RuleForEach method to apply the same rule to multiple items in a collection: public class Person { public List<string>...
Read more >Debt Validation Letters: How to Use Them to Crush ... - YouTube
Debt Validation Letters: How to Use Them to Crush Debt Collection (UPDATE: new rules in description) · Chapters. View all · Chapters ·...
Read more >New rules for 2022 (get the FREE debt validation demand form)
NEW RULES for DEBT VALIDATION took effect November 30, 2021, and they include a NEW FORM LETTER to send to debt collectors to...
Read more >7 Defining Validation and Business Rules Declaratively
One benefit of using declarative validation (versus writing your own validation) is that the validation framework takes care of the complexities of batching ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s the point - you don’t need to write rules for collections manually.
Octopus will derive rules for collection automatically!
However sometimes you may want to additionally restrict collection itself. In this case you can define your own rules and compose with derived ones:
Intentionally this should work equally well for asynchronous validators.
It seems that works better like this: