FV React Form
Flexible React form with validation.
Installation
To install into your project, run this command.
npm install --save fv-react-form
Usage
; { return <Form // Called if validation passes action= console method="POST" name="login" rules= name: 'required' // Called every time form is submitted onSubmit= console > /* Show all errors */ <FormErrors/> <FormGroup> <FormInput type="name" name="name" placeholder="Name"/> /* Show field error */ <FormError field="name"/> </FormGroup> <FormButton type="submit">Submit</FormButton> </Form> ; }
Examples
To build examples, run this command.
npm run build-examples
Contributing
All contributions are welcome. Before starting work on your contribution, please contact the maintainer to make sure no one else is working on the same contribution as you. To develop examples, run this command.
npm run dev-examples
If you add a new example, make sure to update the compiler file webpack.mix.js with your new example file.