validate-form-simple
TypeScript icon, indicating that this package has built-in type declarations

2.2.1 • Public • Published

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 the example locally in the browser:
   npx serve example
  1. Create a new release with changelog and version bump:
   npm run release

📁 Project Structure

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

📄 License

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

Package Sidebar

Install

npm i validate-form-simple

Weekly Downloads

142

Version

2.2.1

License

ISC

Unpacked Size

58.8 kB

Total Files

10

Last publish

Collaborators

  • isonnymichael