Validate every input, file, and form on your site from one place — no schema, no dependencies, just the HTML you already wrote.
NFSFU234FormValidation is a lightweight, dependency-free client-side form validation library that works with the HTML attributes already present in a form, rather than requiring a separate validation schema.
Version 3.0.0 is the largest release in the library's history — a redesigned developer experience, automated API documentation, a real Jest test suite, and an always-async validation API.
What it does
- Validates inputs, textareas, selects, radio groups, checkboxes, and file/image uploads
- File and image validation — MIME type, extension, file size, and image dimension limits
- Inline or modal error messages, with full custom message support
- Built-in AJAX submission — JSON, FormData, custom headers, success/error callbacks
configureForms() and autoInit() apply declarative validation rules across every form on a multi-page site from one place
- Password utilities — strength checking and generation (client-side password hashing was removed in 3.0.0; it never actually protected a password in transit, and a real backend should already own that)
A quick example
import NFSFU234FormValidation from "@nfsfu234/form-validation";
const validator = new NFSFU234FormValidation({ form: "#loginForm" });
const result = await validator.submit();
if (result.type === "success") {
console.log("Validated!");
}
Framework-agnostic — works with Vanilla JS, React, Next.js, Vue, Svelte, Angular, Astro, and Vite. MIT licensed, part of the @nfsfu234 open-source ecosystem.