MCPcopy Create free account
hub / github.com/codemistic/Web-Development / setError

Function setError

Form Validation/script.js:68–74  ·  view source on GitHub ↗
(input,msg)

Source from the content-addressed store, hash-verified

66
67
68function setError(input,msg){
69 const formControl=input.parentElement;
70 const small=formControl.querySelector("small");
71 small.innerText=msg;
72 // add error class
73 formControl.className="form-control error";
74}
75function setSuccess(input){
76 const formControl=input.parentElement;
77 formControl.className="form-control success";

Callers 1

checkInputsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected