[attributs] Nettoyage de la validation du Téléphone

This commit is contained in:
Nicolas Dandrimont 2010-10-16 17:48:03 +02:00
parent 2d0faa1d54
commit 9b79664264
2 changed files with 4 additions and 2 deletions

View file

@ -80,8 +80,8 @@ def format_tel(tel):
Retourne le numéro formaté.
"""
tel_f = tel.strip()
if tel.startswith(u"+"):
tel_f = u"00" + tel[1:]
if tel_f.startswith(u"+"):
tel_f = u"00" + tel_f[1:]
if u"(0)" in tel_f:
tel_f = tel_f.replace(u"(0)", u"")
tel_f = re.sub(r'\D', '', tel_f)