0.1.1 • Published 3 years ago

@rndm/render-plugin-validator v0.1.1

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
3 years ago

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": ["info@rndm.com"]
        },
        "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.

0.1.1

3 years ago

0.1.0

5 years ago