Regarding Email Validation On Mobile Application
Hi i have used below code for email property validation . Its working fine in desktop , when comes to mobile application its accepting incorrect format ( Ex : abc@gmail ) and not throwing validation error.
When comes to desktop its throwing validation if i give the above format , its accepting the correct format . ( Ex : Proprietary information hidden ).
Can someone help me on this issue.
Here is the code which i used in edit validate :
if (theValue == null || theValue.trim().equals("")) return false;
try {
javax.mail.internet.InternetAddress emailAddr = new javax.mail.internet.InternetAddress(theValue);
emailAddr.validate();
}
catch (javax.mail.internet.AddressException ex){
return false;
}
if(theValue.contains("."))
return true;
theProperty.addMessage("Enter a Valid Email Address");
return false;