Is Sanitizing the input data required in Authentication?
top of page

Is Sanitizing the input data required in Authentication?


Sanitizing Input data is very much required to increase the user experience in any website. We all do small mistakes by sometimes writing our Email with all CAPS ON and even sometimes we put an extra white space in our password which shows errors but NodeJs express-validation gives us special abilities to get rid of that.


How to Sanitize Data in NodeJs?


Just by using .trim() in our router where we can also use our custom designed Validation.

.trim() removes any white space after the input.

.normalizeEmail() gives us the power to make our email letter in small letters. even we write all of them in CAPS On.


15 views0 comments

Recent Posts

See All

SQL UNION GROUP BY

SQL UNION Operator UNION operator is used to combine the results of two or more SELECT statements Every SELECT statement within UNION must have the same number of columns The columns must also have si

SQL JOIN

JOIN clause is used to combine rows from two or more tables. INNER JOIN === selects records that have matching values in both tables SELECT Orders.OrderID, Customers.CustomersID, Orders.OrdersDate FRO

bottom of page