Is an email
Definition
Return true if a string is an email.
Usage
addRule("field -> email")
Tests
@Test
public final void testRuleNumericOk() throws Exception {
UtilTest.testIt("email", "[email protected]", true);
UtilTest.testIt("email", "[email protected]", true);
UtilTest.testIt("email", "[email protected]", true);
}
@Test
public final void testRuleNumericNotOk() throws Exception {
UtilTest.testIt("email", "[email protected].", false);
UtilTest.testIt("email", "[email protected]", false);
UtilTest.testIt("email", "..@fejwn.", false);
UtilTest.testIt("email", "@", false);
UtilTest.testIt("email", "[email protected]", false);
UtilTest.testIt("email", "[email protected]", false);
}