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 c2a0db2 commit dd07c6eCopy full SHA for dd07c6e
protovalidate/internal/rules.py
@@ -348,13 +348,16 @@ def _validate_cel(
348
result = cel.runner.evaluate(activation)
349
if isinstance(result, celtypes.BoolType):
350
if not result:
351
+ message = cel.rule.message
352
+ if len(message) == 0:
353
+ message = "\"{}\" returned false".format(cel.rule.expression)
354
ctx.add(
355
Violation(
356
field_value=this_value,
357
rule=cel.rule_path,
358
rule_value=cel.rule_value,
359
rule_id=cel.rule.id,
- message=cel.rule.message,
360
+ message=message,
361
for_key=for_key,
362
),
363
)
0 commit comments