@manufosela/automatic-form-validation
v1.6.0
Published
Automatic HTML form validation using data-* attributes, dependency-free and browser-focused.
Maintainers
Readme
@manufosela/automatic-form-validation
Lightweight, dependency-free form validation for the browser using data-* attributes.
Install
pnpm add @manufosela/automatic-form-validationBasic usage
<form data-validate="true">
<label for="email">Email</label>
<input id="email" data-required="true" data-tovalidate="email" />
</form>
<script type="module">
import { ValidateForm } from "@manufosela/automatic-form-validation";
const validateForm = new ValidateForm();
</script>Demo
Open demo/index.html to choose a demo:
demo/basic.htmlfor a minimal exampledemo/advanced.htmlfor complex scenarios
You can also run pnpm -C demo dev to launch the demo with Vite.
