Open
Description
Add a special validator that uses multiple validators in a chain to validate data.
Possibly two variations of this (two validator classes or one with a parameter?):
- Fallback chain: Try to validate with each validator, return data if one validator succeeds, else fallback to the next validator until one succeeds. (Sort of like
validator1 OR validator2 OR ... OR validatorN
) - Filter chain: Pipe the output of each validator as input to the next validator in the chain, return the result of the last validator, fail if any validator fails. (Sort of like unix pipes:
validator1 | validator2 | ... | validatorN
or likevalidator1 AND ...
).