From 398ece7fb2d64331c5396b82eea24fcd1c57c189 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Mon, 14 Dec 2009 10:19:23 +0000 Subject: [PATCH] regex fix: escape the first '-' too, add start/end of the string. --- PLC/Persons.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PLC/Persons.py b/PLC/Persons.py index bcfd565..1d3059f 100644 --- a/PLC/Persons.py +++ b/PLC/Persons.py @@ -84,7 +84,7 @@ class Person(Row): if not email: raise invalid_email - email_re = re.compile('[a-zA-Z0-9._%+-]+@[a-zA-Z0-9._\-]+\.[a-zA-Z]+') + email_re = re.compile('\A[a-zA-Z0-9._%+\-]+@[a-zA-Z0-9._\-]+\.[a-zA-Z]+\Z') if not email_re.match(email): raise invalid_email -- 2.43.0