react-native-custom-regex

1.0.6 • Public • Published

Usage of Different regex functions which returns boolean - true or false if test passes.

  • 1.Run npm i react-native-custom-regex --save
  • 2.import { onlyNumerics, onlyAlphabets, onlyNumberAndDots, exactlyOneNumeric } from 'react-native-custom-regex'

Getting started

  1. atLeastOneAlphabet("a123b") - returns boolean if it contains atleast one Alphabet.

  2. atLeastOneNumeric("922") - returns boolean if it contains atleast one Numeric.

  3. checkDateFormat("DD-MM-YYYY or DD-MM-YY") - Check Date Format: DD-MM-YYYY or DD-MM-YY and return boolean.

  4. checkPhoneNumberRegex("9676366633") - returns boolean if it contains PhoneNumber characters.

  5. exactlyOneNumeric("1") - returns boolean if it contains exactly One Numeric only.

  6. onlyAlphaNumeric("123") - returns boolean if it contains only Alphabets and Numerics.

  7. onlyAlphabets("string") - returns boolean if it contains only Alphabets.

  8. onlyAlphabetsAndSpaces("string1 string2") - returns boolean if it contains only Numeric and Spaces.

  9. onlyEmail("str@str.str) - returns boolean if it passes email test: str@str.str

  10. onlyNumberAndDots("123 or .") - returns boolean if it contains only Numeric and Dots.

  11. onlyNumerics("123") - returns boolean if it contains only Numerics.

  12. onlyPassword("Aa@123") - returns boolean if it contains Password with combination of at least 1 uppercase, 1 lowercase and 1 special character

Readme

Keywords

Package Sidebar

Install

npm i react-native-custom-regex

Weekly Downloads

1

Version

1.0.6

License

ISC

Unpacked Size

3.85 kB

Total Files

4

Last publish

Collaborators

  • navdeepgarg91