Skip to content

A lightweight and extensible JavaScript library for validating HTML forms — simple, dependency-free, and built for customization.

License

Notifications You must be signed in to change notification settings

isonnymichael/validate-form-simple

Repository files navigation

Validate Form Simple

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.


📦 Installation

Install via npm:

npm install validate-form-simple

🛠 Development

To clone and build the project locally:

  1. Clone the repository:
   git clone https://github.com/isonnymichael/validate-form-simple.git
  1. Move into the project directory:
   cd validate-form-simple
  1. Install dependencies:
   npm install
  1. Build the project:
   npm run build
  1. Run test:
   npm run test
  1. 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

🏗️ Tech Stack

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

📁 Project Structure

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

🧑‍💻 Contributing

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


📄 License

ISC License
© Sonny Michael (https://github.com/isonnymichael)

About

A lightweight and extensible JavaScript library for validating HTML forms — simple, dependency-free, and built for customization.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •