@rndm/render-plugin-validator
v0.1.1
Published
RNDM Render Plugin: Validator. Validation functionality for RNDM Render
Downloads
4
Readme
RNDM Render Plugin: Validator
About
This plugin provides the validation functionality for the RNDM Render package.
Installation
If you have not already done so, then please ensure you have installed the RNDM Render and RNDM Plugin: Core package.
From NPM
npm install --save @rndm/render-plugin-validator
Post Installation
In order to allow this plugin to work, it must first be included in your project. You can do this inside your main index file:
import '@rndm/render-plugin-core';
import '@rndm/render-plugin-validator';
Usage
The Validator Plugin transforms a suite of methods used for validation and sanitisation into into serialisable functions.
Example
{
"type": "react-native.TouchableOpacity",
"props": {
"onPress": {
"isFunc": true,
"type": "validator.isEmail",
"args": ["[email protected]"]
},
"children": {
"type": "react-native.Text",
"props": {
"children": "Touch Me"
}
}
}
}
There are a suite of examples included in the RNDM Playground tool.
Check out the Playground page to see how these features work.