Re: [FE-discuss] List of all errors encountered in a form

Top Page
Author: Brennan Todd
Date:  
To: Ian Bicking
CC: formencode-discuss, Jules
Subject: Re: [FE-discuss] List of all errors encountered in a form
I just checked the pylons @validate (
http://pylonshq.com/project/pylonshq/browser/pylons/decorators/__init__.py),
and it places the entire errors dictionary into c.form_errors.

On Wed, Feb 4, 2009 at 5:43 PM, Ian Bicking <ianb@???> wrote:

> On Wed, Feb 4, 2009 at 4:13 PM, Jules@??? <Jules@???> wrote:
>
>> Hi,
>>
>> Is there an easy way to access any errors which may have been flagged in a
>> schema in a final chained validator? I want to insert a generic message at
>> the top of the page letting the user know that the form has errors.
>> I was approaching this through a custom chained_validator but I'm unsure
>> of
>> what value to test against to see if any errors have allready occoured,
>> error_dict dosen't seem to exist. This is in pylons using @validate
>> decorator.
>>
>
> Chained validators don't have access to previous errors. The actual
> validation produces an exception that contains all the errors. @validate
> then runs those through htmlfill. I'm not sure if there's a way to get into
> @validate; you might want to ask on the Pylons list.
>
>
>> An alternative [hacky ]fix to my problem and also something I'm having no
>> luck with would be to be able to anchor to the top of the form when the
>> page is reloaded, but I've no idea how to achieve it.
>>
>
> I'm not sure what you mean? Oh, like redirect to #top? You could change
> to <form action="page#top">; for successful submissions that shouldn't do
> anything, but for unsuccessful submissions you'd go to the top.
>
>
> --
> Ian Bicking | http://blog.ianbicking.org
>
>
> ------------------------------------------------------------------------------
> Create and Deploy Rich Internet Apps outside the browser with
> Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code
> to
> build responsive, highly engaging applications that combine the power of
> local
> resources and data with the reach of the web. Download the Adobe AIR SDK
> and
> Ajax docs to start building applications today-
> http://p.sf.net/sfu/adobe-com
> _______________________________________________
> FormEncode-discuss mailing list
> FormEncode-discuss@???
> https://lists.sourceforge.net/lists/listinfo/formencode-discuss
>
>

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com_______________________________________________
FormEncode-discuss mailing list
FormEncode-discuss@???
https://lists.sourceforge.net/lists/listinfo/formencode-discuss