PHPackages                             shankar-thiyagaraajan/javascript-form-validator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. shankar-thiyagaraajan/javascript-form-validator

Abandoned → [global-source/javascript-form-validator](/?search=global-source%2Fjavascript-form-validator)Library[Validation &amp; Sanitization](/categories/validation)

shankar-thiyagaraajan/javascript-form-validator
===============================================

JavaScript Based Form Validator.

0.9(9y ago)8102MITJavaScript

Since May 1Pushed 6y ago4 watchersCompare

[ Source](https://github.com/global-source/javascript_form_validator)[ Packagist](https://packagist.org/packages/shankar-thiyagaraajan/javascript-form-validator)[ RSS](/packages/shankar-thiyagaraajan-javascript-form-validator/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (6)DependenciesVersions (4)Used By (0)

Global Source - JavaScript Form Validator \[Ready to Use\]
----------------------------------------------------------

[](#global-source---javascript-form-validator-ready-to-use)

[![Packagist](https://camo.githubusercontent.com/a082e2e4e525bd2f4634246ad409b2ad26c22797441a92a9f7ea0529c9bef48c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4a6176615363726970742d436f72652d627269676874677265656e2e737667)](https://github.com/global-source/javascript_form_validator) [![Packagist](https://camo.githubusercontent.com/9539891af9df59c59a0216cd581be2cd435b07d7baa9833fa1c187c25e77a620/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4a6176615363726970742d4553362d677265656e2e737667)](https://github.com/global-source/javascript_form_validator) [![License](https://camo.githubusercontent.com/99b461076680d0ca9c87def98b93faf92506d1fcdcf89254db6102e2ccaf0b36/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4275696c642d562e322e302d626c75652e737667)](https://github.com/shankarThiyagaraajan/PHP_Migration/blob/master/LICENSE)

### Installation

[](#installation)

```
git clone https://github.com/global-source/javascript_form_validator.git
git checkout -b [VERSION]

```

Why me ?
--------

[](#why-me-)

- Support **Native** and **ES6** Javascript,
- Pure Javascript Code (**No Dependency**),
- Simplified Implementations,
- **HTML 5 validation** for all Browsers,
- Reliable and **Dynamic** level **DOM** Validations,
- Dynamic auto scroll with element.

**Steps to Integrate to Form :**

```

 or

```

Then Integrate your form with Validator.

```

    var myform = new jsValidator().init({
        form: 'form2submit',   // #id
    });

```

Options
-------

[](#options)

NameValuesDescriptionsMandatoryform\#ID**ID** of the Form to handle validations and filters.YesforceFilterBool**True**, to allow form filter without form validations. **False**, default.NomessageObjectResponse message for all HTML elements.NoLogBoolTo enable error log on console.No---

Actions
-------

[](#actions)

### `check()` : Return as Form is Valid or Not.

[](#check--return-as-form-is-valid-or-not)

```
// Retrun status as True|False.
 myform.check()
```

### `update()` : Update Newly created DOM elements to Validator.

[](#update--update-newly-created-dom-elements-to-validator)

```
 // It will update the DOM.
 myform.update()
```

---

Attributes
----------

[](#attributes)

NameValuesDescriptionsrequiredTrue, FalseSet the fields is required to submit the Form.minIntegerTo set the Minimun value to proceed.maxIntegerTo set the Maximum value to proceed.data-maxlength="10"IntegerTo set the Maximum length of characters to proceed.maxLength="10"IntegerTo set the Maximum length of characters to proceed.type="password"AlphaNumericTo set and compare password.type="email"AlphaNumericTo check the email is valid or not.type="file"string \['png,jpeg..'\]To check the file format is allowed or not.data-message="Error Message"StringUser defined, element based direct error message to handle.data-allow="onlyAlpha"Alphabets OnlyAllow only string, no digits and no special characters.data-allow="string"Alphabets + Numbers OnlyAllow only string and digits, no special characters.data-allowSpecial="/\_+"Special charactersAllow only given special characters.\[INDEX\]NumericNow supports Min&amp;Max validation to show the limit.Currently the validation will trigger on submit button trigger.

It has automated listener to monitor every changes on form.

**Note:**

1. Validation take place between tags, so need to specify the **ID**
    of the Form or any other tags.

```
      // Preferred

          // Not-Preferred.
```

#### For General Input Validation

[](#for-general-input-validation)

2. Input Fields should specify the type of validation.

```

        Only Alpha

        String

        Pattern

        Number

        Min Validator

        Email Validator

         File

        Password

        Password

        List

             Item1
             Item2
             Item3

         Description

```

3. In form use **`novalidate`** to avoid browser interuptions.

    ```

         ...
         ...

    ```

#### Sample

[](#sample)

```
 // For Native & ES6 Javascript.
 var myform = new jsValidator().init({
        form: 'form2submit',   // #id
        forceFilter: true,
         message: {
            required: 'This field is required !',
            min: 'This field is less then the limit',
            max: 'This field is exceeds the limit',
            password: 'Password doesn\'t match !',
            email: 'Invalid Email found !',
            file: 'Invalid File format given'
        }
    });

```

It Will listen the **Submit** event **Automatically** and initiating the validation checks. And based on response, it will allow to submit or throw messages.

License
=======

[](#license)

Copyright (c) 2016 Shankar Thiyagaraajan

### MIT License

[](#mit-license)

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3348d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/310342f019559d8ee139f94cfbbcb0c83fc577c6cda3ec3373ee7ba81314f32c?d=identicon)[shankarthiyagaraajan](/maintainers/shankarthiyagaraajan)

---

Top Contributors

[![shankarThiyagaraajan](https://avatars.githubusercontent.com/u/10199091?v=4)](https://github.com/shankarThiyagaraajan "shankarThiyagaraajan (192 commits)")

---

Tags

domdynamices6-javascripthtml5-validationjavascriptjavascript-validationlightweightlistennative-javascript-pluginvalidation-library

### Embed Badge

![Health badge](/badges/shankar-thiyagaraajan-javascript-form-validator/health.svg)

```
[![Health](https://phpackages.com/badges/shankar-thiyagaraajan-javascript-form-validator/health.svg)](https://phpackages.com/packages/shankar-thiyagaraajan-javascript-form-validator)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
