8000 Test new version of Formsy-React with React 0.14 · Issue #158 · christianalfoni/formsy-react · GitHub
[go: up one dir, main page]

Skip to content
Test new version of Formsy-React with React 0.14 #158
@christianalfoni

Description

@christianalfoni

Hello there!

I am working on the new release of Formsy-React, using the BETA version of React 0.14 (https://facebook.github.io/react/blog/2015/07/03/react-v0.14-beta-1.html). React 0.14 brings a long some necessary fixes to make Formsy take its next step.

It would be great if you could help test this new version and add any issues to the comments below. I have set up a small repo to make it as easy as possible for you to test the new functionality.

Get started

  1. Clone the following repo: https://github.com/christianalfoni/formsy-test.git
  2. npm install
  3. npm start
  4. Go to http://localhost:8080/webpack-dev-server/bundle

It is ready with ES6 syntax and JSX syntax, using Webpack and Babel.

Fixes in new version

  • getErrorMessages() gives all registered errors
  • required and validations props can now be changed at runtime and the form will re-validate itself
  • You can now use application/x-www-form-urlencoded style on naming your elements (contacts[0][name]) and it will be converted to plain JS object
<MyInput name="persons[0][name]" value="Charles"/>
// form-data: { persons: [{name: 'Charles'}] }
  • Elements no longer needs to have the same owner as the form element, nest and wrap as much as you want
<Formsy.Form>
 <MyElementsWrapper/> // Has some formsy elements children inside it
</Formsy.Form>

Warning

  • There seems to be an issue with React 0.14 BETA 1 and the event object. If event.target.value is not available, use event.currentTarget.value

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0