We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1ab4cd commit c957c54Copy full SHA for c957c54
gladiator/core.py
@@ -111,7 +111,9 @@ def _has_selector(validator):
111
return len(validator) >= 1 and isinstance(validator[0], str)
112
113
def _apply_selector(obj, selector_str, current_selector):
114
- if selector_str == '@all':
+ if selector_str in ctx.get('custom_selectors', {}):
115
+ return ctx['custom_selectors'][selector_str](obj, current_selector)
116
+ elif selector_str == '@all':
117
return [(current_selector + [index], value) for index, value in enumerate(obj or [])]
118
elif selector_str == '@first':
119
return [(current_selector + [0], obj.get(0))]
0 commit comments