DEV Community

Discussion on: Good Practices: how to sanitize, validate and escape in PHP [3 methods]

Collapse
 
v461m profile image
v461m

Good Article, but what about if in login form the username can be an email address or a simply username?
We need to validate data and then sanitize...
Thank you for your valuable tips

Collapse
 
anastasionico profile image
anastasionico

Correct, also if we know that the form accepts email addresses for instance it would be useful to use value object.
Thanks for your comment