The case does not matter with Apache commons email validator, here is the sample code
import org.apache.commons.validator.routines.EmailValidator;
public class Main {
public static void main(String[] args) {
EmailValidator validator = EmailValidator.getInstance();
if (validator.isValid("john@newman.COM")) {
System.out.println("Valid");
} else {
System.out.println("Invalid");
}
}
}
I have tested this code with commons-validator-1.6.jar and the emails john@newman.COM, john@newman.Com are valid as per the code.
Output - Valid
Apache commons validator internally converts the email to lower case before matching the patterns for a valid email, hence the case will not matter.