title: Backbone.js: run validations and fire error events on set, but don't abort set if validations fail
body: <p>I've got a Backbone model with a custom validate method that validates the format of one of a the model's attributes. My model is hooked up to a view that exposes said attribute via a text field. The view has a 'save' button that the user must explicitly press to save the model changes back to the server.</p>
  
  <p>When the user types an invalid attribute value, I want to visually mark the field as being in an invalid state. So far, easy - I can bind the change event of the input field to a function that calls <code>myModel.set({ attribute: value })</code>, and listen for the <code>"error"</code> event on the model to tell when the validation has failed and I should mark the input as invalid.</p>
  
  <p>The problem comes when I want to handle the save button click. Because <code>Backbone.Model.set</code> aborts actually setting the attributes on the model if validation fails, my model will not accurately reflect the value the user has entered unless the value is valid. When the user clicks save after typing in an invalid value, I check whether the model is valid, find that it is (because the invalid attribute was never actually set), and save the old (valid) attribute value to the server.</p>
  
  <p>What it seems like I want is a version of <code>set</code> that always makes the requested changes, but also still triggers validations and events. <code>set(..., { silent: true })</code> will allow the change to go through, but will not run validations or trigger events.</p>
  
  <p><strong>In short - I want my model to sometimes exist in an invalid state (if the user has entered invalid attribute values), and I want to be able to get events when it transitions between valid and invalid.</strong> Is there a graceful way to do this with backbone, or am I thinking about this completely wrong?</p>