Interface JsValidator
-
- All Known Implementing Classes:
DefaultJsValidator
public interface JsValidator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Stringvalidate(String jsTemplate, Collection<String> allowedVariables)Check if the the given javascript fragment has no syntax errors.
-
-
-
Method Detail
-
validate
String validate(String jsTemplate, Collection<String> allowedVariables)
Check if the the given javascript fragment has no syntax errors.- Parameters:
jsTemplate- The javascript template to validate.allowedVariables- The only set of variables that can be referenced from the JS body- Returns:
- An error message in case an error exists, or null if everything is ok.
-
-