title: how to trim request param values before validating them with spring mvc?
body: <p>I have code like this:</p>
  
  <pre class="lang-kotlin prettyprint-override"><code>data class LoginParams(
          @field:NotNull
          @field:Email
          @field:Size(min = 1, max = 100)
          val email: String?,
          @field:NotNull
          @field:Size(min = 4, max = 100)
          val pass: String?
  )
  
  @PostMapping("/login")
  fun login(@Valid params: LoginParams){
     //...
  }
  
  </code></pre>
  
  <p>I want the <code>email</code> field to be <code>trim()</code>'ed before doing the <code>@Size</code> validation on it. how do I achieve so?</p>