Class HtmlTagValidator

java.lang.Object
io.goobi.viewer.faces.validators.HtmlTagValidator
All Implemented Interfaces:
EventListener, javax.faces.validator.Validator<String>

public class HtmlTagValidator extends Object implements 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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns false if the input string is not blank and does not contain any tags other than the allowed
    void
    validate(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String input)
    Throws a ValidatorException with message key validate_error_scriptTag if validate(String) returns false

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 a ValidatorException with message key validate_error_scriptTag if validate(String) returns false
      Specified by:
      validate in interface javax.faces.validator.Validator<String>
      Throws:
      javax.faces.validator.ValidatorException
    • validate

      public boolean validate(String input)
      Returns false if the input string is not blank and does not contain any tags other than the allowed
      Parameters:
      input - a String object.
      Returns:
      a boolean.