0.0.22 • Published 9 years ago

react-form-essentials v0.0.22

Weekly downloads
2
License
ISC
Repository
github
Last release
9 years ago

"WORK & DOCS IN PROGRESS"

FOR TESTING ONLY - WAIT for production release.

About this release:

  • Because it has material-ui wrapped around it, you have to initialize 'react-tap-event-plugin' (see below how)
  • For more info check GITHUB (example folder)

There are two branches:

develop

  • where core is developed
  • no extra styles

material-ui

  • this branch comes from develop but has material-ui around it
  • so when you use material design components you can use them with validations

STYLES

  • only few basic styles
  • styles are written in .styl(stylus)
  • there is also compiled version styles.css so include it in your app

SET UP

  1. install

    npm i react-form-essentials material-ui -S

  1. initialize material-ui

    import {init} from 'react-form-essentials';

    init();

  2. load components and use them as shown below

    import {ValidForm, Field} from 'react-form-essentials';


Form syntax

<ValidForm errors={errorsObject}
		    debug={true}
		    onSubmit={dummyHandler}>
    <!--children here-->
</ValidForm>
  • debug: will provide form feedback
  • errors: send errors object available for all child components ( if this object has property with the name of child component, the value will be displayed as error for that component - this is good when checking errors asynchronously in "container components")
  • onSubmit: is a submit handler (use from outside container)

Field syntax

<Field name="someName"
   type="text"
   placeholder="HintText"
   required={true}
   validator={isLength:2}
   icons={false}
   label="Some label">
</Field>
  • name: input name
  • type: input type
  • placeholder: hint text for input
  • validator: isLength:1:5|isAlpha|contains:test
  • icons: show/hide icons (default: true)
  • label: input label
  • defaultError: default error message when field is invalid

Dropdown syntax

TODO

Toggle syntax

TODO


Supported validators: A LOT :) ...comming soon

SAMPLES

enter image description here


enter image description here


enter image description here


enter image description here


enter image description here

0.0.22

9 years ago

0.0.21

9 years ago

0.0.20

9 years ago

0.0.19

9 years ago

0.0.18

9 years ago

0.0.17

9 years ago

0.0.16

9 years ago

0.0.15

9 years ago

0.0.14

9 years ago

0.0.13

9 years ago

0.0.12

9 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago