Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7DA972007D0 for ; Tue, 10 May 2016 22:59:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7C6F3160A12; Tue, 10 May 2016 20:59:14 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F353E16098A for ; Tue, 10 May 2016 22:59:13 +0200 (CEST) Received: (qmail 35726 invoked by uid 500); 10 May 2016 20:59:13 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 35556 invoked by uid 99); 10 May 2016 20:59:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 May 2016 20:59:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 09F482C0451 for ; Tue, 10 May 2016 20:59:13 +0000 (UTC) Date: Tue, 10 May 2016 20:59:13 +0000 (UTC) From: "Mathieu Neron (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (VALIDATOR-395) Email address with leading/trailing space(s) are considered valid. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 10 May 2016 20:59:14 -0000 [ https://issues.apache.org/jira/browse/VALIDATOR-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15278881#comment-15278881 ] Mathieu Neron commented on VALIDATOR-395: ----------------------------------------- OK good to know, thanks Sebb! > Email address with leading/trailing space(s) are considered valid. > ------------------------------------------------------------------ > > Key: VALIDATOR-395 > URL: https://issues.apache.org/jira/browse/VALIDATOR-395 > Project: Commons Validator > Issue Type: Bug > Components: Routines > Affects Versions: 1.5.1 > Reporter: Mathieu Neron > Priority: Minor > Fix For: 1.5.1 > > Original Estimate: 2h > Remaining Estimate: 2h > > I recently replaced our custom email regex we were using in our project with org.apache.commons.validator.routines.EmailValidator, but it broke 2 of my cases in the unit tests I had written for it: > -" leading@space.com" expected to be invalid > -"trailing@space.com " expected to be invalid > Are those considered valid in RFC1034/RFC1123? If not, a simple fix would be to check for leading/trailing spaces at the same location were you check that the email doesn't end with a period, at line 162 or EmailValidator.java, since it's cheap as well. > -- This message was sent by Atlassian JIRA (v6.3.4#6332)