react-native-custom-regex
v1.0.6
Published
This package provide all custom regex by just giving the type.
Downloads
7
Readme
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
atLeastOneAlphabet("a123b") - returns boolean if it contains atleast one Alphabet.
atLeastOneNumeric("922") - returns boolean if it contains atleast one Numeric.
checkDateFormat("DD-MM-YYYY or DD-MM-YY") - Check Date Format: DD-MM-YYYY or DD-MM-YY and return boolean.
checkPhoneNumberRegex("9676366633") - returns boolean if it contains PhoneNumber characters.
exactlyOneNumeric("1") - returns boolean if it contains exactly One Numeric only.
onlyAlphaNumeric("123") - returns boolean if it contains only Alphabets and Numerics.
onlyAlphabets("string") - returns boolean if it contains only Alphabets.
onlyAlphabetsAndSpaces("string1 string2") - returns boolean if it contains only Numeric and Spaces.
onlyEmail("[email protected]) - returns boolean if it passes email test: [email protected]
onlyNumberAndDots("123 or .") - returns boolean if it contains only Numeric and Dots.
onlyNumerics("123") - returns boolean if it contains only Numerics.
onlyPassword("Aa@123") - returns boolean if it contains Password with combination of at least 1 uppercase, 1 lowercase and 1 special character