Copy the full code of this recipe from the
code/05/validate-form sources folder. This code can be launched using the URL
main.html, add the following code to create a form:
<form id='commentform' action='#' method='post'> <div data-role='fieldcontain'> <label for='username'>Name</label> <input id='username' name='username' type='text' ...