Take the 2-minute tour ×
User Experience Stack Exchange is a question and answer site for user experience researchers and experts. It's 100% free, no registration required.

Suppose that there are textbox First name and Last Name. Should we trim it before entering it into database For example

First name "John      " -> trim to "John"

Last name  "Lennon  " -> trim to "Lennon"
share|improve this question
1  
I am not convinced this is really UX? The answer is yes, but not for UX reasons. –  Schroedingers Cat May 17 '12 at 8:01
    
should it on stackoverflow ? –  Sarawut Positwinyu May 17 '12 at 8:02
    
@SarawutPositwinyu - not really. The answer is probably "yes", but there may be cases where you don't want to trim. –  ChrisF May 17 '12 at 8:20
    
@SarawutPositwinyu StackOverflow would be better IMO. But it might depend why you are asking. –  Schroedingers Cat May 17 '12 at 8:27
1  
This is off-topic for UX.SE and isn't detailed enough to be migrated over to StackOverflow so it's been closed off here. –  JonW May 17 '12 at 8:57
show 1 more comment

closed as off topic by Schroedingers Cat, Roger Attrill, ChrisF, JonW May 17 '12 at 8:57

Questions on User Experience Stack Exchange are expected to relate to user experience within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

up vote 1 down vote accepted

Absolutely...always trim data before storing it. (P.S. This question really belongs on StackOverflow rather than here)

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.