title: Problem with remote validation in asp.net mvc 3
body: <p>I have a Person Model</p>
  
  <pre><code>public class Person
      {
  
          public int  ID { get; set; }
          [Required]
          [Remote("UserNameExists", "People", "Username is already taken.")]
          public string Name { get; set; }
          [Required]
          public string LastName { get; set; }
  
  
  
      }
  </code></pre>
  
  <p>This is my UserNameExists method</p>
  
  <pre><code>public JsonResult UserNameExists(string name)
          {
              bool exists = personRepository.GetPersonByName(name.Trim());
              if (!exists)
                  return Json(true, JsonRequestBehavior.AllowGet);
  
              return Json(string.Format("{0} is not avavfddvilable.", name),
                      JsonRequestBehavior.AllowGet);
          }
  </code></pre>
  
  <p>When I have Javascript enabled it works just fine but when I disable javascript this rule is not enforced...</p>
  
  <p>Why is this?</p>
  
  <p>Please Help.</p>
  
  <p><strong>Edit for expected behavior:</strong></p>
  
  <p>According to <a href="http://msdn.microsoft.com/en-us/library/gg508808%28v=vs.98%29.aspx" rel="nofollow">msdn</a> it should respect this rule even without Javacript</p>
  
  <blockquote>
    <ol>
    <li>Optionally, disable client script in your browser, run the page again,
    and enter data that violates the
    validation constraints.</li>
    </ol>
    
    <p>As you leave the field that contains
    the invalid data, you do not see a
    validation error because scripting is
    disabled. Because ASP.NET MVC is using
    unobtrusive JavaScript, you do not see
    client-side script errors. However,
    server-side validation is performed
    when you submit the form. (It is a
    good practice to test your Web
    application with a browser that has
    scripting disabled.)</p>
  </blockquote>