<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">What do you think of<div>public class ConstraintValidatorContext {</div><div> <b>addInterpolatedParameter(String name, String value);</b></div><div>}</div><div><br></div><div>public class SyntaxValidator implements ConstraintValidator<Syntax, String> {</div><div> public boolean isValid(String value, ConstraintValidatorContext context) {</div><div> detectedSyntax = ...;</div><div> context.addInterpolatedParameter("detectedSyntax", detextedSyntax);</div><div> return allowedSyntaxes.contains(detectedSyntax);</div><div> }</div><div>}</div><div><br></div><div>@Syntax(value={JAVA, HTML}, message="{constraint.syntax}")</div><div>String text;</div><div><br></div><div>ValidatorMessage_en.properties</div><div>constraint.syntax=Unable to support {detectedSyntax}</div><div><br></div><div><br></div><div>=></div><div>"Unable to support PHP"</div></div></body></html>