-- minItems validation -- longer is valid SELECT is_jsonb_valid('{"minItems":1}', '[1,2]'); is_jsonb_valid ---------------- t (1 row) -- exact length is valid SELECT is_jsonb_valid('{"minItems":1}', '[1]'); is_jsonb_valid ---------------- t (1 row) -- too short is invalid SELECT is_jsonb_valid('{"minItems":1}', '[]'); is_jsonb_valid ---------------- f (1 row) -- ignores non-arrays SELECT is_jsonb_valid('{"minItems":1}', '""'); is_jsonb_valid ---------------- t (1 row)