validate-form-simple is a lightweight JavaScript library for effortless HTML form validation.
Easily add validation to your forms without writing lengthy and complex JavaScript code.
It supports automatic checking for required fields, email format, and phone number — and is fully customizable.
Install via npm:
npm install validate-form-simple
To clone and build the project locally:
- Clone the repository:
git clone https://github.com/isonnymichael/validate-form-simple.git
- Move into the project directory:
cd validate-form-simple
- Install dependencies:
npm install
- Build the project:
npm run build
- Run test:
npm run test
- Create a new release with changelog and version bump:
npm run release
Options | Version |
---|---|
release:major |
x.0.0 |
release:minor |
0.x.0 |
release:patch |
0.0.x |
Layer | Technology |
---|---|
Language | JavaScript (ESM + CJS) |
Bundler | Microbundle |
Testing | Jest + jsdom |
Linting & Format | ESLint + Prettier |
Git Hooks | Husky + lint-staged + Commitlint |
Release Tooling | standard-version |
Package Registry | npm |
validate-form-simple/
├── .gitignore # Git ignored files config
├── LICENSE # License file (ISC)
├── README.md # Project documentation
├── dist/ # Bundled output (ESM, CJS, UMD) from Microbundle
├── example/ # Demo HTML file for testing in browser
│ └── index.html
├── package.json # Project metadata and scripts
├── src/ # Source code for the library
│ ├── index.js # Main form validation logic (entry point)
│ ├── utils/ # Utility functions (e.g. error display, field name)
│ │ └── helper.js
│ └── validators/ # Field validation functions
│ ├── email.js # Email validation logic
│ ├── phone.js # Phone number validation logic
│ └── index.js # Re-exports email & phone validators
├── test/ # Unit tests for core functionality
└── validate-form-simple.test.js
We welcome contributions from developers of all experience levels!
If you'd like to help improve this project — whether it's fixing bugs, adding features, or improving documentation — follow our contributing guide:
👉 Read the CONTRIBUTING.md guide
ISC License
© Sonny Michael (https://github.com/isonnymichael)