Trim text fields when validating