if (address != null) { if (!s_perl.match(s_regex, address.toString())) { value.addError("\"" + value + "\" is not a valid " + "email address"); }
if (!s_perl.match(s_regex, ((InternetAddress) value).toString())) { errors.add("The value is not a valid email address");
    public void validate(final ParameterValue value) {        final InternetAddress address = (InternetAddress) value.getValue();        if (address != null) {            if (!s_perl.match(s_regex, address.toString())) {                value.addError("\"" + value + "\" is not a valid " +                               "email address");            }        }    }