Form Validatior (4) - Check Length, Email & Password match
// Event listeners form.addEventListener('submit', function(e) { e.preventDefault(); checkRequired([username, email, password, password2]); checkLength(username, 3, 15); checkLength(password, 6, 25); }); // Check input length function checkLength(input, min, max) { if (input.value.length < min) { showError( input, `${getFieldName(input)} must be at least ${min} characters` ); } else if (input.va..