Change text input's value if invalid
<p>Hi Im using jQuery's validate (awesome) script to validate a small form. It is just an email sign up and there isn't a lot of room around it to display the error message. I can change the input's value to "Thank You" with successful AJAX submission, but want to change it to display the correct error msg if its invalid.</p>

<p>HTML</p>

<pre><code>&lt;div id="emailBox"&gt;
    &lt;form id="email" action="/PHP/email-cURL.php" method="post"&gt;
    &lt;input type="text" id="e" name="email1" value="Email Sign Up" class="swap_value signup" /&gt;
    &lt;input type="submit" value="" id="signUp" /&gt;
    &lt;/form&gt;
&lt;/div&gt;
</code></pre>

<p>and the JS</p>

<pre><code>$("#email").validate ({
        errorElement: "//what do I wrap error msg in to populate value?",
            errorPlacement: function(error, element) {
                error.appendTo( element.parent("div"));
            },

            submitHandler: function(form) {
            var dataString = $(form).serialize();
                $.ajax({
                    type: $(form).attr('method'),
                    url: form.action,
                    data: dataString,
                    clearForm: true,
                    success: function(data) {
                        if (data=="Error") {
                            $("#e").val('Error');
                        } else {
                            $("#e").val('Thank You');
                            }
                    }
                });
            return false;

           },
                       //rules,
                       //messages 
</code></pre>

<p>Is there an easy way to do this? I don't need a ton of code since its just one simple form input.</p>

<p>Thanks!</p>
