2 ms·
> Input sanitization is strictly checking front-end input against a ruleset and rejecting anything that does not comply. That's validation. Sanitization involv
by Izkata 7y ago
> Input sanitization is strictly checking front-end input against a ruleset and rejecting anything that does not comply.
That's validation. Sanitization involves altering the data to make it safe (comes from the word "sanitary").
- organsnyder 7y agoRejecting input is a valid sanitization strategy, though.
- SahAssar 7y agoThat's not how the word is usually used within development in my experience though. I think most devs think of sanitization as "make X safe", not "see if X is safe, if not reject" since that is usually called validation. Using hand sanitizer does not remove your hands if they have harmful bacteria. The hands are still there, just cleaned from (some) of the harmful parts.