2008/10/28 Matthew Wilson <matt@???>:
> On Tue, Oct 28, 2008 at 3:32 AM, Marcin Stępnicki <mstepnicki@???> wrote:
>
>> Could someone put me on the right track?
>
> Take a look at my edits to your code: http://arag0rn.pastebin.pl/3220
>
> I pulled your validate1 function out from inside your MySchema class
> and I added some logging to make debugging a little more
> straightforward. Here's what I get when I run the code now:
>
> DEBUG:root:testing out logger...
> DEBUG:root:locals inside here: {'state': None,
> 'validator': <SimpleFormValidator object 76 func=<function validate1
> at 0x85c7f0c> validate_partial_form=True>,
> 'value_dict': {'a': 321, 'b': '', 'other1': 'True', 'other1_name': ''}}
> {'other1_name': u'Field cannot be blank'}
>
> Now your validate1 method does get invoked even though b is empty.
Thank you. You are right, but it didn't return the error message for
_both_ b and other1_name (and it should). Anyway, it seems that we've
found a bug, Ian fixed it and everyone is happy :-).
Regards,
Marcin
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
FormEncode-discuss mailing list
FormEncode-discuss@???
https://lists.sourceforge.net/lists/listinfo/formencode-discuss