Re: [Zope3-Users] Re: formlib vs. cancel button

2007-02-15 Thread Maciej Wisniowski
> Yes. I think you misunderstand my suggestion. I knew someone will write this :) I didn't think about default validator value before sending my previous email. I found this pattern after later... at bed :) so I agree that this might be a good solution that has enough backward compatibility and se

[Zope3-Users] Re: formlib vs. cancel button

2007-02-15 Thread Martin Aspeli
Maciej Wisniowski wrote: @form.action("Cancel", validator=None) -1 from me Currently above code is same as: @form.action("Cancel") So I think this is a very common pattern that means: do standard validation, do not use additional action validator. Yes. I think you misunderstand my

Re: [Zope3-Users] Re: formlib vs. cancel button

2007-02-15 Thread Maciej Wisniowski
>> @form.action("Cancel", validator=None) -1 from me Currently above code is same as: >> @form.action("Cancel") So I think this is a very common pattern that means: do standard validation, do not use additional action validator. In general there are two validators. Action validator (one

[Zope3-Users] Re: formlib vs. cancel button

2007-02-15 Thread Martin Aspeli
Marius Gedminas wrote: I'd be happy to implement and commit something Yay! but I'd be happier if someone else designed the API. When I try to design APIs myself, I tend to change my mind too often. Now I want @form.action("Cancel", validator=None) to mean "do no validation". But per

Re: [Zope3-Users] Re: formlib vs. cancel button

2007-02-15 Thread Marius Gedminas
On Thu, Feb 15, 2007 at 05:37:52PM +0100, Philipp von Weitershausen wrote: > Martin Aspeli wrote: > >Marius Gedminas wrote: > >>On Thu, Feb 15, 2007 at 09:55:19AM +, Martin Aspeli wrote: > >>>Dennis Schulz wrote: > I dont know if it is the "proper" way, > but when I return an empty stri

[Zope3-Users] Re: formlib vs. cancel button

2007-02-15 Thread Martin Aspeli
Philipp von Weitershausen wrote: Martin Aspeli wrote: Marius Gedminas wrote: On Thu, Feb 15, 2007 at 09:55:19AM +, Martin Aspeli wrote: Dennis Schulz wrote: I dont know if it is the "proper" way, but when I return an empty string there is no validation error. This was also one of the str

[Zope3-Users] Re: formlib vs. cancel button

2007-02-15 Thread Philipp von Weitershausen
Martin Aspeli wrote: Marius Gedminas wrote: On Thu, Feb 15, 2007 at 09:55:19AM +, Martin Aspeli wrote: Dennis Schulz wrote: I dont know if it is the "proper" way, but when I return an empty string there is no validation error. This was also one of the strangest things I found out with for

[Zope3-Users] Re: formlib vs. cancel button

2007-02-15 Thread Martin Aspeli
Marius Gedminas wrote: On Thu, Feb 15, 2007 at 09:55:19AM +, Martin Aspeli wrote: Dennis Schulz wrote: I dont know if it is the "proper" way, but when I return an empty string there is no validation error. This was also one of the strangest things I found out with formlib. I found tha

Re: [Zope3-Users] Re: formlib vs. cancel button

2007-02-15 Thread Marius Gedminas
On Thu, Feb 15, 2007 at 09:55:19AM +, Martin Aspeli wrote: > Dennis Schulz wrote: > >I dont know if it is the "proper" way, > >but when I return an empty string there is no validation error. > > > >This was also one of the strangest things I found out with formlib. > > I found that returni

[Zope3-Users] Re: formlib vs. cancel button

2007-02-15 Thread Martin Aspeli
Dennis Schulz wrote: I dont know if it is the "proper" way, but when I return an empty string there is no validation error. This was also one of the strangest things I found out with formlib. I found that returning {} also works. But this is clearly a design weakness if there is no other