For tokwa friends CJ and Jerome coding challenge.
- fork this repo and.
- clone your forked repo in your local machine.
- Create a folder with your first name, and put your codes inside.
- File to create,
index.html
andindex.js
- In your HTML file... create a form with two fields,
firstname
andlastname
field with submit button. - In your js file..... use this API to validate the form in the HTML....
// index.js
// Put your codes here for creating `FormValidator` function code.
// Hints :
// - form submit event listener inside the `FormValidator` function
// this must stay...
FormValidator({
id: "formIdHere",
rules: {
firstname: "minLen:2", // means minimum length
lastname: "maxLen:5", // means maximum length
}
});
-
When the HTML form is submitted (form submit event), form validation starts , and console.log() if the
firstname
andlastname
passed the validation(simple message). -
When done, push the code in your repo and perform pull request in this repo.
Goodluckz mga ka tokwa! πβοΈ