@Test public void testInvalid() { assertThat(Labels.isValid("-abcdefghijklmnopqrstyvwxyz0123456789")).isFalse(); assertThat(Labels.isValid("abcdefghijklmnopqrstyvwxyz0123456789-")).isFalse(); assertThat(Labels.isValid("01234567890123456789012345678901234567890123456789012345678912345")).isFalse(); }
public static boolean isValid(String name) { return name.matches(VALID_VALUE_REGEX) && name.length() <= MAXIMUM_NAME_LENGTH; }
Labels { public static boolean isValid(String name) { return name.matches(VALID_VALUE_REGEX) && name.length() <= MAXIMUM_NAME_LENGTH; } }
Labels { public static boolean isValid(String name) { return name.matches(VALID_VALUE_REGEX) && name.length() <= MAXIMUM_NAME_LENGTH; } private  Labels(); }
Labels { public static boolean isValid(String name) { return name.matches(VALID_VALUE_REGEX) && name.length() <= MAXIMUM_NAME_LENGTH; } private  Labels(); static String sanitize(String name); static boolean isValid(String name); static String validate(String name); }
Labels { public static boolean isValid(String name) { return name.matches(VALID_VALUE_REGEX) && name.length() <= MAXIMUM_NAME_LENGTH; } private  Labels(); static String sanitize(String name); static boolean isValid(String name); static String validate(String name);  }