#8798: Add DEPhoneNumberField to German localflavor module
-------------------------------------------------+--------------------------
          Reporter:  jezdez                      |         Owner:  jezdez
            Status:  new                         |     Milestone:        
         Component:  django.contrib.localflavor  |       Version:  SVN   
        Resolution:                              |      Keywords:        
             Stage:  Accepted                    |     Has_patch:  1     
        Needs_docs:  0                           |   Needs_tests:  0     
Needs_better_patch:  0                           |  
-------------------------------------------------+--------------------------
Changes (by mtredinnick):

  * stage:  Unreviewed => Accepted

Comment:

 Keep in mind what the idea behind these sorts of fields are: if you are
 expecting a German phone number and it must be a German phone number, then
 it should be possible to validate that. Which often means just checking
 the number of digits (that varies from country to country). It would also
 be reasonable to check for a leading, optional, "+49", possibly followed
 by a "0" (again optional, if +49 was there), if you want to go that far.
 If you throw out all  punctuation and spaces and then did that, you could
 normalise the number to something that started with a 0, didn't have +49
 at the front and was hyphenated however you like. More than that would be
 a little optimistic, but at that point all of the formats you currently
 accept will still be acceptable (as you note, people commonly write ", +49
 (0)...", which doesn't meet any official standards except the most
 important one of all: people use that in normal everyday life). So don't
 throw out the baby along with the bathwater here. Certainly allow all
 these nicely specified formats. But also allow people who just want to
 write down the phone number in a commonly used way.

 The idea is to "be liberal in what you accept" and then normalise it to a
 standard form for later processing. The UK postcode field is a pretty good
 example of this (read the changelogs for that file in subversion
 sometime).

 Also, I'm now holding you to the higher standard of "must be usable by
 your grandma.". Future patches on this ticket may require a signed note
 from her saying that she approves.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8798#comment:6>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to