I've actually been thinking about this, recently. How would people feel
about a Field type that took a regex to validate input against.

Or, to be even more wacky, how about providing callables that would
validate the input and normalize it? Something like

def __init__(self, validator=lambda x: true, normalizer=lambda x: x):

So, by default, it doesn't validate or normalize, but you can provide a
function for each.

Or am I being overly complicated?

Todd

On Wed, 2006-10-18 at 09:19 +0000, GinTon wrote:
> Thanks Russ for your message. I became angry because I have been
> working very hard during 2 or 3 months.
> 
> I hoped that somebody said some idea for its possible implementation
> 
> Using those data we could have fields as USStateField and
> PhoneNumberField for all countries (and validators). But I don't see a
> solution very clean. Any idea?
> 
> For the others tables (countries, languages, time zones), I believe
> that it would be cool if it were used from an AJAX widget. What do you
> think?
> 
> I only want ideas to begin to look for the best solution and to begin
> with the implementation. And better if it's a solution that can be used
> for any project in general.



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to