Package io.goobi.viewer.faces.validators
Class HtmlTagValidator
java.lang.Object
io.goobi.viewer.faces.validators.HtmlTagValidator
- All Implemented Interfaces:
EventListener
,javax.faces.validator.Validator<String>
Validates that any input text has no html-tags other than
<
<
- 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 any tags other than the allowedvoid
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
-
HtmlTagValidator
public HtmlTagValidator()
-
-
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 any tags other than the allowed- Parameters:
input
- aString
object.- Returns:
- a boolean.
-