zackify / validify

Simple-as-possible React form validation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Recursive cloning of elements is missing top level element

audiolion opened this issue · comments

From the examples dir the surrounding dive around the next button won't be rendered currently.

class App extends Component {
  render() {
    return (
      <div className="App">
        <Form rules={{ email: 'email|required', password: 'required|min:8' }}>
          <Input name="email" />
          <Input name="password" type="password" />
          
          <div className="surroundingDivThatWontBeRendered">
            <div
              submit
              onClick={values => console.log('if validation passes, this logs')}
            >
              Submit!
            </div>
          </div>
        </Form>
      </div>
    );
  }
}

Easy fix for this, currently making all the tests and once done will add one for this and fix it.