New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@rsuite/schema-form

Package Overview
Dependencies
Maintainers
5
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rsuite/schema-form

Form generation and validation based on schema-typed and rsiute

latest
Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
2
100%
Maintainers
5
Weekly downloads
 
Created
Source

schema-form

Form generation and validation based on schema-typed and rsiute.

Installation

npm install @rsuite/schema-form --save

Usage

import SchemaForm from '@rsuite/schema-form';
import { InputNumber, SelectPicker, Schema } from 'rsuite';

const { StringType, NumberType } = Schema.Types;

const Form = SchemaForm([
  {
    key: 'username',
    type: StringType().isRequired('This field is required'),
    label: 'Username'
  },
  {
    key: 'email',
    type: StringType().isEmail('Please enter a valid email address'),
    label: 'Email',
    helpBlock: 'Please enter your company email address'
  },
  {
    key: 'age',
    type: NumberType('Please enter a valid number'),
    label: 'Age',
    componentClass: InputNumber,
    componentProps: {
      autoComplete: 'off',
    }
  },
  {
    key: 'group',
    type: NumberType(),
    label: 'User Group',
    componentClass: SelectPicker,
    componentProps: {
      style: {
        width: 300
      },
      data: [{ value: 1, label: 'Admin' }, { value: 2, label: 'User' }],
    }
  }
]);

ReactDOM.render(<Form />, mountNode);

preview

Documentation

  • Form examples
  • Form props

License

MIT licensed

Keywords

form

FAQs

Package last updated on 02 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts