MCPcopy
hub / github.com/bradtraversy/vanillawebprojects / showError

Function showError

form-validator/script.js:8–13  ·  view source on GitHub ↗
(input, message)

Source from the content-addressed store, hash-verified

6
7// Show input error message
8function showError(input, message) {
9 const formControl = input.parentElement;
10 formControl.className = 'form-control error';
11 const small = formControl.querySelector('small');
12 small.innerText = message;
13}
14
15// Show success outline
16function showSuccess(input) {

Callers 4

checkEmailFunction · 0.85
checkRequiredFunction · 0.85
checkLengthFunction · 0.85
checkPasswordsMatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected