Package io.goobi.viewer.faces.validators
Class HtmlScriptValidator
java.lang.Object
io.goobi.viewer.faces.validators.HtmlScriptValidator
- All Implemented Interfaces:
EventListener
,javax.faces.validator.Validator<String>
Validates that any input text has no "script" tags
- Author:
- Florian Alpers
-
Field Summary
Fields inherited from interface javax.faces.validator.Validator
NOT_IN_RANGE_MESSAGE_ID
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns false if the input string is not blank and does not contain the string<script
(disregarding case)void
validate
(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String input) Throws aValidatorException
with message keyvalidate_error_scriptTag
ifvalidate(String)
returns false
-
Constructor Details
-
HtmlScriptValidator
public HtmlScriptValidator()
-
-
Method Details
-
validate
public void validate(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String input) throws javax.faces.validator.ValidatorException Throws aValidatorException
with message keyvalidate_error_scriptTag
ifvalidate(String)
returns false- Specified by:
validate
in interfacejavax.faces.validator.Validator<String>
- Throws:
javax.faces.validator.ValidatorException
-
validate
Returns false if the input string is not blank and does not contain the string<script
(disregarding case)- Parameters:
input
- aString
object.- Returns:
- a boolean.
-