Closed ghost closed 4 years ago
Hi, thanks for using Yamale!
I'm usually not a fan of schema contained within the file being validated. One, it requires multiple passes through each structure, the schema and the target files, which complicates the code and requires special handling just for that validator. Two, more opinion based, it's better to keep validation values within the schema. If there's a different structure that's valid, then it should require a different schema.
I would suggest you use the enum validator for this case.
Hi,
OK, that's a pity. I'll close this then and handle it manually at runtime.
Cheers
Hi,
first of all thanks for the work on this. It's very easy to use. I do have a feature request though.
It would be great if it were possible to add a validator that checks if a value is within a list provided by the user.
A simple example to illustrate what I'm talking about:
Schema
Data
Thank you