DiogenesAnalytics / parley

Browser-based interview/application form.
https://diogenesanalytics.com/parley/
MIT License
0 stars 3 forks source link

Refactor: Move Input Validation Into Function #19

Open DiogenesAnalytics opened 7 months ago

DiogenesAnalytics commented 7 months ago

Problem

The JS code responsible for "validating" form inputs is being duplicated in the event listeners for the "Send" and "Download Form" button respectively.

Code:

Solution

Refactor into a single function (e.g. validateForm()).