1.0.8 • Published 4 years ago

vanila-js-validation v1.0.8

Weekly downloads
20
License
ISC
Repository
github
Last release
4 years ago

Welcome to Vanilla JavaScript validation package

vanilla-js-validation is validation library using pure JavaScript including the following methods that can help you to validate your form inputs in easy way:

  • isCharacter

  • isValidEmail

  • isEqual

  • exceedMaxLength

  • matchMinLength

  • isNumber

  • isRequired

  • toEnglishNumber

  • isSaudiMobile

Installation

  • Step 1: npm i vanila-js-validation --save

  • Step 2: import Validation from 'vanila-js-validation';

Methods

methodParamtersReturn
isCharctervaluetrue if the value is character, otherwise return false
isValidEmailvaluetrue if email is valid, otherwise return false. Email can accept domain and sub domain
isEqualvalue1 , value2true if value one equals value two otherwise return false
exceedMaxLengthvalue , expected lengthtrue if length exceed the length , otherwise return false
matchMinLengthvalue , expected lengthtrue if length doesn't match min-length , otherwise return false
isNumbervaluetrue if the value is number, otherwise return false
isRequiredvaluetrue if value length equals 0 otherwise return false
toEnglishNumbervalueconverted Arabic numbers from Engilsh numbers

To do

  • Write More validation methods!
1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago