GrowingTableFieldSet and validation

2 views
Skip to first unread message

Gustavo Narea

unread,
Sep 26, 2008, 2:49:20 PM9/26/08
to toscawidge...@googlegroups.com, Paul Johnston
Hello,

How can I define a validator for a GrowingTableFieldSet widget? I want to
prevent duplicate values in one of the fields, but a code like this
http://paste.turbogears.org/paste/8108 (being UniqueLanguageSettings a valid
validator) raises an exception like this:
http://paste.turbogears.org/paste/8109

Specifically, I want to do this: Every row in my GrowingTableFieldSet has a
field called "Language" and I don't want any other row to re-define settings
for a language that has already been defined.

Thanks in advance.
--
Gustavo Narea.
http://gustavonarea.net/

Get rid of unethical constraints! Switch to Freedomware:
http://softwareliberty.com/


Gustavo Narea

unread,
Sep 29, 2008, 11:41:20 AM9/29/08
to toscawidge...@googlegroups.com
In other words, how can you validate a TW compound widget so that you can
check that there are no repeated values?

Cheers.

Paul Johnston

unread,
Oct 20, 2008, 9:42:46 AM10/20/08
to ToscaWidgets-discuss
Hi,

> In other words, how can you validate a TW compound widget so that you can
> check that there are no repeated values?

A proper solution will require some tweaks to tw.dynforms to give you
more control of validation.

As a workaround for now, you can put this validation login in the
validator for the schema/form that contains the GrowingTableFieldSet.
That should get you going at least.

Regards,

Paul
Reply all
Reply to author
Forward
0 new messages