Member-only story

form validator with Javascript

YvonneDev
3 min readDec 8, 2020

--

Form validator is a basic function when building a website with sign-in and sign-up sites. Normally the backend will require the user’s name, email, and password, meanwhile double type the email to verify the email is no typo error.

The form contains username, email, password, and verifying password.

HTML

The container includes a form which can submit. Four inputs with labels.

And also link the css style and js script.

small is the section to show up the messager.

CSS

set up the label to block to show in one line.

when input is being focused,change the brorder color and hide the outline.

hide the message first, when error happends,the message shows up.

and also the border color changes when the status of input changes.

when focusing on the button, the style changes.

--

--

YvonneDev
YvonneDev

Written by YvonneDev

❤️Front-end Web Development self-taught *share what I learned*

No responses yet