To validate an Edit form
<p>I have a set of data which I entered into database after validation, Now again if I want to Edit the values I am displaying it as form but on submit the Edited Values the validation script is saying that the value already exists. I cant disable the validations also. How to get out of it? Should I consider selective validation. But I only want to know what is the best preferred practice in this regard. </p>

<p>Here is the code. The Html shows a sample of fields in the Form, I am echoing the data which 
the user entered at first, since this form is to allow him edit the existing data. But suppose if the user makes changes into the second field only, the validation function gives back the message that Group Name already exists in the DataBase for Group Name field. Which ofcourse I don't want, I want it to smoothly allow the edit process to culminate.</p>

<pre><code>  &lt;div class="row"&gt;
    &lt;div class="control-group span3"&gt;
          &lt;label class="control-label" for="group_name"&gt;GROUP NAME *&lt;/label&gt;  
      &lt;div class="controls"&gt;
          &lt;?php
           echo "&lt;input type=\"text\" name=\"group_name\" id=\"group_name_id\"      value=\"".$group['group_name']."\"&gt;";
          ?&gt;
     &lt;/div&gt;
   &lt;/div&gt;
 &lt;/div&gt;

&lt;div class="row"&gt;
    &lt;div class="control-group span10"&gt;
        &lt;label class="control-label" for="group_desc"&gt; GROUP DESCRIPTION &lt;/label&gt;
        &lt;div class="controls"&gt;
           &lt;?php
              echo "&lt;input type=\"text\" name=\"group_desc\" value=\"".$group['group_desc']."\"&gt;";
           ?&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>Then I am validating it with jQuery by running a validateForm function on it.</p>

<pre><code>       jQuery("#edit_group_form").submit(function(){
                 return validateForm(this);
             });
</code></pre>
