Skip to content

Commit

Permalink
Fixed syntax for validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
igr committed Dec 31, 2016
1 parent 45fee37 commit eb86276
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -42,8 +42,12 @@ public boolean isValid(ValidationConstraintContext vcc, Object value) {
return true;
}

RFC2822AddressParser RFC2822AddressParser = new RFC2822AddressParser(value.toString());
RFC2822AddressParser.ParsedAddress address = RFC2822AddressParser.LOOSE.parse(value.toString());

return RFC2822AddressParser.isValid();
if (address == null) {
return false;
}

return address.isValid();
}
}

0 comments on commit eb86276

Please sign in to comment.