luc-ribeiro / simple-form-validator-js

A simple form validator made with JavaScript. The validator will check if a field is empty and will return an error message below the specific field.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple Form Validator

Clique aqui para ver a versão em Português.

💻 Projeto

A simple form validator made with JavaScript. The validator will check if a field is empty and will return an error message below the specific field.

Live Preview

🚀 Technologies

Luc-HTML Luc-CSS Luc-JS

Preview

banner

📄 How to use

Clone this repository:

  $ git clone https://github.com/luc-ribeiro/form-validator-js.git

For validations, insert a data-rules attribute in the input you want to validate.

 <input type="text" name="email" data-rules="required|email" />
 <input type="password" name="senha" data-rules="required|min=4" />

Specify if the field is required required in the data-rules and what the restriction is.
Use email to validate emails and min to validate the minimum number of characters.


Access the project using the Live Server extension of Visual Studio Code.

📝 License

MIT © 2021 Lucas Ribeiro

About

A simple form validator made with JavaScript. The validator will check if a field is empty and will return an error message below the specific field.


Languages

Language:CSS 35.5%Language:JavaScript 35.1%Language:HTML 29.4%