@Test public void testSpace() throws Exception { assertFalse(XsdIDValidator.validate("test me")); }
public static boolean validate(String name) { if (isFirstLetterValid(name)) { for (int i = 0; i < name.length(); i++) { String text = name.substring(i, i + 1); if (!isLetter(text) && !isNumber(text) && !text.contains("_") && !text.contains("-") && !text.contains(".")) { return false; } } return true; } else { return false; } }
XsdIDValidator { public static boolean validate(String name) { if (isFirstLetterValid(name)) { for (int i = 0; i < name.length(); i++) { String text = name.substring(i, i + 1); if (!isLetter(text) && !isNumber(text) && !text.contains("_") && !text.contains("-") && !text.contains(".")) { return false; } } return true; } else { return false; } } }
XsdIDValidator { public static boolean validate(String name) { if (isFirstLetterValid(name)) { for (int i = 0; i < name.length(); i++) { String text = name.substring(i, i + 1); if (!isLetter(text) && !isNumber(text) && !text.contains("_") && !text.contains("-") && !text.contains(".")) { return false; } } return true; } else { return false; } }  }
XsdIDValidator { public static boolean validate(String name) { if (isFirstLetterValid(name)) { for (int i = 0; i < name.length(); i++) { String text = name.substring(i, i + 1); if (!isLetter(text) && !isNumber(text) && !text.contains("_") && !text.contains("-") && !text.contains(".")) { return false; } } return true; } else { return false; } }  static boolean validate(String name); }
XsdIDValidator { public static boolean validate(String name) { if (isFirstLetterValid(name)) { for (int i = 0; i < name.length(); i++) { String text = name.substring(i, i + 1); if (!isLetter(text) && !isNumber(text) && !text.contains("_") && !text.contains("-") && !text.contains(".")) { return false; } } return true; } else { return false; } }  static boolean validate(String name);  }