code: public static boolean call(PageContext pc, String type, Object value, Object objPattern) throws PageException {
  	type = type.trim();
  
  	if (!"regex".equalsIgnoreCase(type) && !"regular_expression".equalsIgnoreCase(type))
  	    throw new FunctionException(pc, "isValid", 1, "type", "wrong attribute count for type [" + type + "]");
  
  	return regex(Caster.toString(value, null), Caster.toString(objPattern));
      }
docs: regex check
  
  @param pc
  @param type
  @param value
  @param objPattern
  @return
  @throws PageException