title: Strip whitespace from fields before Angular post request
body: <p>I need to strip all whitespace from three fields (leading, trailing and between characters) that will be sent to the backend by Angular post request. Data is passed from the form data object. Currently I have solved it by creating custom deserializer for Jackson that does the job, but I would be more interested to remove them before they reach my Spring backend. </p>
  
  <pre><code>function insertNumber(form, result) {
      NumberSequence.save({"type": form.$name}, form.$data,
          success(result),
          error(form, result));
  }
  </code></pre>
  
  <p>Data here contains 3 fields:</p>
  
  <ul>
  <li>start</li>
  <li>end</li>
  <li>number</li>
  </ul>
  
  <p>I would need to filter all of them.</p>
  
  <p>Any suggestions?</p>