Book Image

Sencha Touch Cookbook

By : Ajit Kumar
Book Image

Sencha Touch Cookbook

By: Ajit Kumar

Overview of this book

Sencha touch is a versatile HTML5-based framework for developing mobile web apps that look and feel native on touch screen devices, and with it you can write your code once and deploy it to both iOS and Android saving you both time and money. The Sencha touch cookbook has a comprehensive selection of recipes covering everything from installation right through to HTML5 geo location. The Sencha Touch Cookbook really is your one stop resource for cross platform HTML5 application development. It covers the basics such as setting up an iOS and Android development environment right through to much more complex development issues such as touch gestures, animation, rich media and geo location. Every recipe is practically focused. Maximum action. Minimum theory.
Table of Contents (17 chapters)
Sencha Touch Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Validating your form


So far, we have looked at how to create a form and make use of different form fields offered by Sencha Touch. Different form fields provide different kinds of information a user can enter. Now, some of them may be valid and some may not. It is a common practice to validate the form and the entered values at the time of posting. Now, based on your application architecture, you may choose to apply all kinds of validations in the frontend UI, or you may choose to handle them in the backend server code, or a combination of the two. All are valid approaches. However, for this chapter, we would assume that we want to validate the form on the frontend to make sure that the values entered are valid.

Sencha Touch does not offer a mechanism to do form validation. As of now, it has no direct support for validating the inputs. If we intend to validate the form, then the code has to be written to do so. There are various approaches to building the form validation capability, depending...