Is not empty


Definition

Return true if a string is not empty.

Usage

addRule("field -> not_empty")

Tests

@Test
public final void testRuleNotEmptyOk() throws Exception {
    System.out.println("=== TEST FOR `not_empty` RULE ===\n");
    UtilTest.testIt("not_empty", "  1 ", true);
    UtilTest.testIt("not_empty", "  123", true);
    UtilTest.testIt("not_empty", "123", true);
    UtilTest.testIt("not_empty", "  ab  ", true);
}

@Test
public final void testRuleNotEmptyNotOk() throws Exception {
    UtilTest.testIt("not_empty", "", false);
    UtilTest.testIt("not_empty", " ", false);
    UtilTest.testIt("not_empty", "    ", false);
}}

results matching ""

    No results matching ""