Form Validation in JavaScript

General questions about coding that aren’t Netlify related are probably better asked elsewhere.

That said, looking at the code you have deployed I can see that the file doesn’t end correctly.

Uncaught SyntaxError: Unexpected end of input (at app.js:29:2)

The closing } that you have at the end of the file is closing the setError function, but nothing is closing the validateForm function.

I can’t advise about the rest of the functionality of the code, but that’s the initial Syntax Error that you’re currently experiencing.

1 Like