code: protected Validator createValidator()
          throws JspException {
          
          FacesContext context = FacesContext.getCurrentInstance();
          Validator validator = null;
          ValueExpression vb = null;
          
          // If "binding" is set, use it to create a validator instance.
          if (binding != null) {
              try {
                  vb = context.getApplication().getExpressionFactory().createValueExpression(context.getELContext(), 
                          binding, Object.class);
                  if (vb != null) {
                      validator = (Validator)vb.getValue(context.getELContext());
                      if (validator != null) {
                          return validator;
                      }
                  }
              } catch (Exception e) {
                  throw new JspException(e);
              }
          } 
          // If "validatorId" is set, use it to create the validator
          // instance.  If "validatorId" and "binding" are both set, store the 
          // validator instance in the value of the property represented by
          // the value binding expression.      
          if (validatorId != null) {
              try {
                  String validatorIdVal = validatorId;
                  if (UIComponentTag.isValueReference(validatorId)) {
                      ValueExpression idBinding = context.getApplication().
                          getExpressionFactory().createValueExpression(context.getELContext(), 
                              validatorId, Object.class);
                      validatorIdVal = (String)idBinding.getValue(context.getELContext());
                  }
                  validator = context.getApplication().createValidator(validatorIdVal);
                  if (validator != null) { 
                      if (vb != null) {
                          vb.setValue(context.getELContext(), validator);
                      }
                  }
              } catch (Exception e) {
                  throw new JspException(e);
              }
          }
          return validator;
      }
docs: <p>Create and return a new {@link Validator} to be registered
  on our surrounding {@link UIComponent}.</p>
  
  @throws JspException if a new instance cannot be created