Add form validation for spaces