Trim form inputs and fix form validation.
Merge remote-tracking branch 'origin/master'