How we can do form validation

0 views
Skip to first unread message

gvkreddy

unread,
Apr 10, 2008, 1:38:44 AM4/10/08
to Google App Engine
Hi,

I am developing one application where i need to check for login
details.

I need to check out details in form whether they are in
specified format or not.

Can we use java script to check these.

Any idea?

Thanks in advance..



Neil Blakey-Milner

unread,
Apr 10, 2008, 1:56:45 AM4/10/08
to google-a...@googlegroups.com
On Thu, Apr 10, 2008 at 7:38 AM, gvkreddy <gvkredd...@gmail.com> wrote:
> I am developing one application where i need to check for login
> details.
>
> I need to check out details in form whether they are in
> specified format or not.
>
> Can we use java script to check these.
>
> Any idea?

JavaScript is generally used on the client side to verify that the
values about to be sent to the server are sensible. However, one
can't assume that JavaScript is available on the client, or that the
client is a web browser, so you should perform validation on the
server side.

In terms of plain Python, FormEncode is the best generic validation
framework I know of. http://pypi.python.org/pypi/FormEncode/ will
lead you to what you need. There is also validation in the Django
forms/newforms system, so you might want to look at that if you choose
to use Django on App Engine.

If you're new to Python, you might want to search
http://pypi.python.org/pypi/ for third-party modules that might make
your life easier.

Good luck,

Neil
--
Neil Blakey-Milner
http://nxsy.org/
n...@nxsy.org

ma...@google.com

unread,
Apr 10, 2008, 12:24:37 PM4/10/08
to Google App Engine
You may also want to look in to Django's form validation framework,
which is supported with Google App Engine. We have an article that
outlines how to use this framework with our system:
http://code.google.com/appengine/articles/djangoforms.html

Javascript can also provide form validation as Neil pointed out.

-Marzia

On Apr 9, 10:56 pm, "Neil Blakey-Milner" <n...@nxsy.org> wrote:
> On Thu, Apr 10, 2008 at 7:38 AM, gvkreddy <gvkreddy.re...@gmail.com> wrote:
> > I am developing one application where i need to check for login
> > details.
>
> > I need to check out details in form whether they are in
> > specified format or not.
>
> > Can we use java script to check these.
>
> > Any idea?
>
> JavaScript is generally used on the client side to verify that the
> values about to be sent to the server are sensible. However, one
> can't assume that JavaScript is available on the client, or that the
> client is a web browser, so you should perform validation on the
> server side.
>
> In terms of plain Python, FormEncode is the best generic validation
> framework I know of. http://pypi.python.org/pypi/FormEncode/will
> lead you to what you need. There is also validation in the Django
> forms/newforms system, so you might want to look at that if you choose
> to use Django on App Engine.
>
> If you're new to Python, you might want to searchhttp://pypi.python.org/pypi/for third-party modules that might make
Reply all
Reply to author
Forward
0 new messages