Press "Enter" to skip to content

JavaScript Library Provides Helpers for Form Validation

Javascript Form Validation Library provides form validation helpers. A versatile data validation library that provides a range of validation helps to validate field values in an easy way.

javascript validation, javascript validate object structure, best javascript form validation library, form validation javascript github, validate js example

Use components:

  • Color
  • DateTime
  • EAN13
  • Email
  • Iban
  • ISBN
  • JWT
  • Password
  • Range
  • Siren
  • Siret
  • Text
  • Url

How to make use of it:

1. Add validation helpers to your web page.

<script src="dist/Color.min.js"></script>
<script src="dist/DateTime.min.js"></script>
<script src="dist/Ean13.min.js"></script>
<script src="dist/Email.min.js"></script>
<script src="dist/Iban.min.js"></script>
<script src="dist/Isbn.min.js"></script>
<script src="dist/Jwt.min.js"></script>
<script src="dist/Password.min.js"></script>
<script src="dist/Range.min.js"></script>
<script src="dist/Siren.min.js"></script>
<script src="dist/Siret.min.js"></script>
<script src="dist/Text.min.js"></script>
<script src="dist/Url.min.js"></script>

2. Check if a coloration (identify, hex, rgb, rgba) is legitimate.

let myColor = new Color();
myColor.isValid("black");
myColor.isValid("#ff0000");
myColor.isValid("rgba(255, 255, 255, 0.4)");

3. Check if a date is valid.

let myDate = new DateTime();
myDate.isValid("2021-07-24 14:30");

4. Check if is a valid EAN13 quantity.

let myEan = new Ean13();
myEan.isValid("761234567894400");

5. Check if an e-mail deal is valid.

let myEmail = new Email();
myEmail.isValid("admin@webcodeflow.com");

6. Check if is a valid International Bank Account Number.

let myIban = new Iban();
myIban.isValid("GB98 MIDL 0700 9312 3456 78");

7. Check if is a legitimate International Standard Book Number.

let myIsbn = new Isbn();
myIsbn.isValid("978-2-02-130452-7");

8. Check if is a JWT (JSON Web Token).

let myToken = new Jwt();
result7 = myToken.isValid("eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c");

9. Check if a password string matches the strength stage.

let myPass = new Password({
    uppercase: true,
    lowercase: true,
    numeric: true,
    special: true,
    minLength: 12
});
myPass.isValid("");

10. Check if a quantity is between 0 to 100.

let myRange = new Range(0, 100);
const result9 = myRange.isValid(99);

11. Check if is a valid SIREN Number (French firms identifier).

let mySiren = new Siren();
mySiren.isValid("123 456 789");

12. Check if is a valid SIRET Number (French firms identifier).

let mySiren = new Siren();
mySiren.isValid("123 456 789");

13. Check if textual content size is between 0 to 100.

let myText = new Text(0, 100);
myText.isValid("webcodeflow.com");

14. Check if is a valid URL.

let myUrl = new Url(["https", "http"]);
myUrl.isValid("https://webcodeflow.com/");

Parameters are as follows:

ParamTypeDescriptionDefault
uppercasebooleanYou require at least 1 uppercase charactertrue
lowercasebooleanYou require at least 1 lowercase charactertrue
numericbooleanYou require at least 1 numeric charactertrue
specialbooleanYou require at least 1 special charactertrue
minLengthintegerYou require a minimum length for password12

isValid(pass) ⇒ object|boolean

ParamTypeDescription
passstringPassword to check

Versatile Data Validation, Javascript Form Validation Plugin/Github, just validate example, javascript form validation example


See Demo And Download

Official Website(NouvelleTechno): Click Here

This superior jQuery/javascript plugin is developed by NouvelleTechno. For extra Advanced Usages, please go to the official website.

Be First to Comment

    Leave a Reply

    Your email address will not be published.