I found all value passed by Model is not trimmed in ASP.net MVC3

Is there a way to:

  1. Apply a trim() on every field in Model (all string fields, at least; but all form fields are string before processed by Model, so better trim them all)
  2. Must before ModelState.IsValid() (because I often found code stucked at weird ModelState.IsValid and later found because the form item did not be trimmed.)

Thanks.

Edit
Report