CodeWithAloha / HIERR

A Human-Centered Digital Engagement Process for the Hawai‘i Economic Recovery & Resilience Project with the State Office of Planning & Sustainable Development
https://hierr.vercel.app/
10 stars 7 forks source link

Add input validation on survey input fields #137

Open avenmia opened 1 year ago

avenmia commented 1 year ago

If the field is numeric, it should check that the user entered a reasonable number. (For example, ages should not be negative) if the field is text, it shouldn't have anything that looks like a sql command.

Check out the following library: https://github.com/validatorjs/validator.js