You can see the example usage here
You can import the script inside the body tag.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>nwjs</title>
</head>
<body>
<form action="" method="post">
<input id="testInput" type="text" placeholder="text">
<span error="testInput"></span>
<button type="submit">Login</button>
</form>
<script src="https://rawcdn.githack.com/fauzan121002/nwjs/7c809ab9c946df252e9c410ee1018a8c24972076/nw.js"></script>
</body>
</html>
Then just add "validate" attribute in your form tag
<form action="" method="post" validate>
supported input type :
- text
- password
- checkbox
- file
- radio
- number and also textarea tag.
You can create new pull requests here
This javascript library is published under MIT License