validation-react-native
v1.0.0
Published
Use this package to get access to different validations at one place.🙌
Downloads
2
Readme
Javascript validations
Use this package to get access to different validations at one place.🙌
API Reference
Email Check
| Parameter | Type | Description |
| :-------- | :------- | :------------------------- |
| email
| string
| Required. email address to check |
Password Check
| Parameter | Type | Description |
| :-------- | :------- | :------------------------- |
| password
| string
| Required. password to check |
Cnic Check
| Parameter | Type | Description |
| :-------- | :------- | :------------------------- |
| cnic
| string
| Required. CNIC to check |
Url Check
| Parameter | Type | Description |
| :-------- | :------- | :------------------------- |
| url
| string
| Required. URL to check |
Installation
Install Validation React Native
with npm
npm install validation-react-native
Usage/Examples
import {isValidEmail, } from 'validation-react-native'
function App() {
console.log(isValidEmail("[email protected]")) //True
console.log(isValidEmail("abcgmail.com")) //False
console.log(isValidPassword("abcd*1234")) /* True => Password must be 8 characters long containing at least 1 lowercase, 1 uppercase, 1 number and 1 special character. */
return
<>
//Your UI code
</>
}