Skip to content

New special validator(s): Validator chains #24

Open
@binaryDiv

Description

@binaryDiv

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 like validator1 AND ...).

Metadata

Metadata

Assignees

No one assigned

    Labels

    new validatorImplementation of a new validator classquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions