validate client side via js

Опубликовано: 20 Март 2017
на канале: Ian Barland
160
1

Doing customized client-side validation, including:
connecting validation-code with specific event-handlers like `onchange` and `onsubmit`
structure of code (validateAll, with helpers for individual-input validations)
cribbing our already-written server-side validation (in php), and converting it to javascript
remember that we are writing a php program which prints html which has embedded javascript inside it
a separate `reportError` function to add the error-message to the page, adding nodes to the DOM as needed