bids-validator
bids-validator copied to clipboard
Feature request: Trigger "warning" if specific value encountered in JSON field
trafficstars
We use the schema for JSON validation and that's great -> however, for some failures (or use cases), I would like to send a specific warning to the user.
Example:
- User tries to specify
RASinEEGCoordinateSystem RASis not on the [list of restricted keywords], the schema errors and prints a list of accepted values- among the printed list, there is
Other, and because it seems like the only fit, the user picksOtherand moves on
--> that's a problem, because if Other is specified in EEGCoordinateSystem, I want the user to specify a string for the EEGCoordinateSystemDescription field to explain in detail what Other means.
So ideally, the validator would provide a re-usable structure to check:
- if value A in field B of any JSON, do action X
- where Z could be either of:
- send a specifically phrased warning
- check value in field C ... and if that value is D, pass ... else raise specifically phrased warning
Does that sound reasonable?