Package Exports
- validation-react-native
- validation-react-native/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (validation-react-native) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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("abc@gmail.com")) //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
</>
}