docs: public void validate(FacesContext context,
                           UIComponent component,
                           Object value)
      {
          if (context == null)
          {
              throw new NullPointerException("context");
          }
          if (component == null)
          {
              throw new NullPointerException("component");
          }
  
          if (value == null)
          {
              return;
          }
          if (!(value instanceof String))
          {
              throw new ValidatorException(_MessageUtils.getErrorMessage(context, NOT_MATCHED_MESSAGE_ID, null));
          }
  
          String string = (String) value;
  
          Pattern thePattern;
          if (pattern == null
           || pattern.equals(EMPTY_STRING))
          {
              throw new ValidatorException(_MessageUtils.getErrorMessage(context, PATTERN_NOT_SET_MESSAGE_ID, null));
          }
  
          try
          {
              thePattern = Pattern.compile(pattern);
          }
          catch (PatternSyntaxException pse)
          {
              throw new ValidatorException(_MessageUtils.getErrorMessage(context, MATCH_EXCEPTION_MESSAGE_ID, null));
          }
  
          if (!thePattern.matcher(string).matches())
          {
              //TODO: Present the patternExpression in a more user friendly way
              Object[] args = {thePattern, _MessageUtils.getLabel(context, component)};
              throw new ValidatorException(_MessageUtils.getErrorMessage(context, NOT_MATCHED_MESSAGE_ID, args));
          }
      }