What is "sanitize"
Sanitization is the process of removing specific characters from a value, which are not required or desired by the user or application.
Generally this process aims to ensure that the integrity of the application.
Among the most common cleaning tasks we can find:
Leave only lower case letters:
LEtras minúsCulas → letras minúsculas
Exchange accented letters for the same letter without accent:
LEtras acêntuádas → LEtras acentuadas
Replace spaces with a hyphen (common in URL Slugs):
URL Slug → URL-Slug
Remove special characters:
#Isto é uma **afirmação**! → Isto é uma afirmação
Leave only numbers:
+44 0800 700 200 → 440800700200