dear all,
 I'm new with jquery and I have problem with my code for forms
validation. the error message cannot show up. I build the web site
using django. my code as per following below:

{% extends 'base_site.html' %}
{% load i18n %}

{% block breadcrumbs %}<div class="breadcrumbs"><a href="/">{% trans
'Home' %}</
a> &rsaquo; {% trans 'Update Profile' %}</div>{% endblock %}

{% block head %}
{% block title %}{% trans "Update Profile" %}{% endblock %}
<link rel="stylesheet" type="text/css" href="/site_media/error.css" />
<script type="text/javascript" src="/site_media/jquery-1.2.6.min.js" /
></script>
<script type="text/javascript" src="/site_media/
jquery.validate.pack.js" /></script>
<script type="text/javascript">
   $(document).ready(function(){
      $('.update').validate({
         rules:{
            email:{
               required: true,
               email: true
            }
         }
         message:{
            email: "e-mail field is required"
         }
      }).addClass("error");
   });
</script>
{% endblock %}

{% block content %}
<h1> Update My Profile </h1>
<br>
<form class="update" id="updateForm"  method="post" actions="."/>
   <table>
      <tr>
         <th><label for="id_email">e-mail:</label></th>
         <td><input type="text" name="email" id="id_email" />
      </tr>
   </table>
   <input type ="submit" value="update" />
</form>
{% endblock %}

kindly advice and really appreciate for your help

best regards,
-Vierda-

Reply via email to