From f6121828bf5bf942c57918485e2a2f91dc7f79dc Mon Sep 17 00:00:00 2001 From: Philip Ashlock Date: Tue, 3 Feb 2015 22:30:16 -0500 Subject: [PATCH 1/2] Don't allow empty email address in v1.1 schema --- v1.1/schema/vcard.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v1.1/schema/vcard.json b/v1.1/schema/vcard.json index d342544c..0afcd80f 100644 --- a/v1.1/schema/vcard.json +++ b/v1.1/schema/vcard.json @@ -25,7 +25,7 @@ "hasEmail": { "title": "Email", "description": "Email address for the contact", - "pattern": "^mailto:([\\w.-]+@[\\w.-]+\\.[\\w.-]+)?$", + "pattern": "^mailto:[\\w.-]+@[\\w.-]+\\.[\\w.-]+?$", "type": "string" } } From bbe82d0e6dfe3a9af806b2829219c937a45a65a6 Mon Sep 17 00:00:00 2001 From: Philip Ashlock Date: Tue, 3 Feb 2015 22:53:33 -0500 Subject: [PATCH 2/2] Adding more characters for v1.1 email validation Acknowledging http://davidcel.is/blog/2012/09/06/stop-validating-email-addresses-with- regex/ but mostly just wanted to make sure common addresses would validate --- v1.1/schema/vcard.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v1.1/schema/vcard.json b/v1.1/schema/vcard.json index 0afcd80f..31a0eb9e 100644 --- a/v1.1/schema/vcard.json +++ b/v1.1/schema/vcard.json @@ -25,7 +25,7 @@ "hasEmail": { "title": "Email", "description": "Email address for the contact", - "pattern": "^mailto:[\\w.-]+@[\\w.-]+\\.[\\w.-]+?$", + "pattern": "^mailto:[\\w\\_\\~\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=\\:.-]+@[\\w.-]+\\.[\\w.-]+?$", "type": "string" } }