vacuumlabs/react-custom-validation

Why the example of this package version "0.1.4" in npm is different from "0.1.2"

Closed this issue · 3 comments

i just npm install react-custom-validation and get the version 0.1.4. Then write the code like example in github, just seprated and , but get error below.

Warning: IsRequired(...): No `render` method found on the returned component instance: you may have forgotten to define `render`, returned null/false from a stateless component, or tried to render an element whose type is a function that isn't a React component.

Uncaught (in promise) Error: Invariant Violation: findComponentRoot(..., .0.1.1.0.$/song/one/101032911-transition.0.0.1.0.0.0.1.0.0.1.0): Unable to find element. This probably means the DOM was unexpectedly mutated (e.g., by the browser), usually due to forgetting a <tbody> when using tables, nesting tags like <form>, <p>, or <a>, or using non-SVG elements in an <svg> parent. Try inspecting the child nodes of the element with React ID ``.(…)

Finally i found that 0.1.4 version use different way to define a rule function, and it's example become this

                <label htmlFor="email">Email: </label>
                <Validate onValidation={this.handleValidation('email')} >
                    <input id="email" onChange={this.handleChange('email')} type="text" value={this.state.email_value} />
                    <IsRequired />
                    <IsEmail msg="The E-mail you entered is invalid" />
                </Validate>

i don's know if you are working towards this combined construction , but not the seprated one before.

Sorry, npm version was obsolete. Published the current github right now. Try version 0.2.0 please.

Hi,
First things first, thank you for such a great library. Among all the libraries for validation, I thought this one by far was the most extensible and easy to use.

I have a question regarding the npm package. When I try to install, the package requires react and react-dom packages to be version < 0.15. I am using react version 15x. Are there any issues with the latest version of react or does the package need to be updated? I can always download and try to integrate manually, just wanted to bring to your attention.

Hi,
Thanks, I am very happy that you like the library!

No, there are not any issues with React 15.x, the dependencies just were not updated for a while. I am currently working on a new version of this library (see branch change-api) which will also have updated React. It will be released soon.