Package io.goobi.viewer.faces.validators
Class HtmlTagValidator
java.lang.Object
io.goobi.viewer.faces.validators.HtmlTagValidator
- All Implemented Interfaces:
jakarta.faces.validator.Validator<String>
,EventListener
Validates that any input text has no html-tags other than
<br>, <b>, <strong>, <em>, <i>, <mark>, <small>, <del>, <ins>, <sub>, <sup>
- Author:
- Florian Alpers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
validate
(jakarta.faces.context.FacesContext context, jakarta.faces.component.UIComponent component, String input) Throws aValidatorException
with message keyvalidate_error_scriptTag
ifvalidate(String)
returns falseboolean
Returns false if the input string is not blank and does not contain any tags other than the allowed
-
Constructor Details
-
HtmlTagValidator
public HtmlTagValidator()
-
-
Method Details
-
validate
public void validate(jakarta.faces.context.FacesContext context, jakarta.faces.component.UIComponent component, String input) throws jakarta.faces.validator.ValidatorException Throws aValidatorException
with message keyvalidate_error_scriptTag
ifvalidate(String)
returns false- Specified by:
validate
in interfacejakarta.faces.validator.Validator<String>
- Throws:
jakarta.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.
-