On Sun, 2007-04-01 at 14:28 +0800, Russell Keith-Magee wrote: > On 4/1/07, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > > > On 4/1/07, James Bennett <[EMAIL PROTECTED]> wrote: > > > Sounds good to me. Based on that, I'll whip up a US SSN field, and I > > > think that following this it will: > > > > > > 1. Validate the number of digits (9). > > > 2. Validate that the number is not one which is known to be > > > permanently invalid (there aren't many of these and they're easy to > > > test for). > > > > > > And leave it at that. Sound good to everyone? > > +1 > > > Sounds good. You've probably already thought of this, but it should > > accept numbers with or without hyphens, and normalize it to the number > > *with* hyphens. > > +1 > > I noticed that the UK postal code will raise a validation error if you > don't type a space separating the two character groups. Brazilian > phone numbers are similarly affected. IMHO, this is something that the > cleaner should fix, not raise as an error. We should be liberal in > what we accept, conservative in what we save, and all that jazz.
Agreed. > > Two other quick localflavor related things - > > 1) Is there any particular reason that the Brazilian validation > messages are in Portuguese, rather than i18n wrapped English? Whoops, my bad. :-( I'd noticed that originally and then forgot about it when I was going through things to commit. We should fix it. I'll get in touch with the contributor. > 2) Is there any reason not to normalize localflavour.usa to > localflavor.us (to match the 2 letter country code scheme used by > other flavors)? One other thing we'll want to keep any eye on is how much duplication of code goes in there. Up to now, I haven't noticed any great opportunity for factoring out common pieces that will save space, but it might come up in the future. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" 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-developers?hl=en -~----------~----~----~----~------~----~------~--~---
