"Michele Cella" <[EMAIL PROTECTED]> writes:

> Yes, this will not work.

Hmmmm...  I always believed that the Schema had priority over the widget
validator.

> Yep, if Ian added it there is probably a good reason. ;-)

Even if it was just "I thought it was right by the time" ;-)

> I think you're misunderstanding what I intend for default validator,
> for a FileField this will be FileUploadStorage... for a multiple

Indeed, I was misunderstanding and I saw that with other posts. :-)  (Also,
sorry for the lot os posts, I'm not at "home", so there are some network
problems here and one of them hold all of my messages and duplicated some of
them...)

> selection field the validator becomes more difficult and I wouldn't
> except anyone being happy to drop the default validator you get in this
> case:
>
> CheckBoxList(options=[(1, "python"), (2, "java")])
>
> to do this instead:
>
> CheckBoxList(options=[(1, "python"), (2, "java")],
> validator=MultipleSelection(Int()))

:-)  Indeed, it gets more complicated...  Maybe that's me that am used to
specify the validator all the time.  I confess, though, that I don't have this
case.  Yet. ;-)

>> What is the problem of saying:
>>
>> field = widgets.FileField(validator=UnicodeString(not_empty=True),
>>       css_classes = ['required'],
>>       )
>>
>> ?  It is much clearer that this filefield widget will accept thos funky
>> Windows files named like "saúde.doc" (health.doc), that it can't be empty and
>> that it should have the CSS class 'required', for layouting purposes...
>>
>
> Mmm, I thought you liked the auto css class for required fields. :-(

I don't remember if it worked for me...  You even said that it had problems
with the "not_empty" syntax...  :-( But I checked it and I don't see the
"requiredfield" class anymore...  (But it is there in my CSS, so I might have
it somewhere...  hehehehe.  I'll check it for you later and I'll tell you if
it works and where.)

-- 
Jorge Godoy      <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" 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/turbogears-trunk
-~----------~----~----~----~------~----~------~--~---

Reply via email to