I found all value passed by Model is not trimmed in ASP.net MVC3
Is there a way to:
- 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)
- Must before
ModelState.IsValid()
(because I often found code stucked at weirdModelState.IsValid
and later found because the form item did not be trimmed.)
Thanks.