data-validator
data-validator copied to clipboard
Unknown fields in the check section of `.yaml` should cause `WARN` log messages.
While testing stringLengthCheck I accidently referenced minLength instead of minValue
This caused configTest() to fail for no apparent reason and took me a really long time to debug because the program was not logging any useful information. configTest() did generate a ValidatorError() event in the eventLog, but the program doesn't write the report.json or HTML report on configTest() failures.
The new Object.fromJson() constructors should log a warn for every unknown field present in the config.
In general, I do not think that unknown fields should be an error, only a warning, this helps keeps the config "compatible" across versions.
Maybe create a cli option for strict config parsing.