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 the example locally in the browser:
npx serve example
- Create a new release with changelog and version bump:
npm run release
validate-form-simple/
├── .gitignore # Git ignored files config
├── LICENSE # License file (ISC)
├── README.md # Project documentation
├── bin/ # CLI entry point for command-line usage
│ └── cli.js
├── 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
ISC License
© Sonny Michael (https://github.com/isonnymichael)