How to validate input controls in jquery and json, asp.net
<p>I am using jquery and json to save data to the database. How can I apply validation on textboxes. if conditions fails i have applied return false; still json data saving code executes.</p>

<pre><code>$('input[type=text]').each(function() {
                // Ex: Person['FirstName'] = $('#FirstName').val();
                //NewPerson[this.id] = this.value;

                if ($(this).val() == '') {
                    alert('Please Enter ' + this.id);
                    return false;
                }
            });

         var DTO = { 'NewPerson': NewPerson };

            $.ajax({
                type: "POST",
                contentType: "application/json; charset=utf-8",
                data: "{'FirstName':'" + $("#FirstName").val() + "', "
   + "'LastName':'" + $("#LastName").val() + "',"
          + "'Zip':'" + $("#Zip").val() + "'}",
</code></pre>

<p>etc.</p>

<p>How to stop datasaving code to execute?</p>
