New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

utils-for-react

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

utils-for-react

This library provides a High Component Order(HOC) for the real-time validation of React web form fields. The validation engine is using [validatorjs](https://www.npmjs.com/package/validatorjs) package.

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

High Component Order for ValidatorJS library

This library provides a High Component Order(HOC) for the real-time validation of React web form fields. The validation engine is using validatorjs package.

How use it

function MyComponent(props) {
  
    return (
      <div>
        <input name="name" onChange={props.onFormChange}
               value={props.formState.name.value}/>

        <button disabled={props.formState.isPristine || !props.formState.isValid}>
            Submit
        </button>
      </div>
    )
}

const WithFormHandler = FormHandler({
  name: "string|required"
})(MyComponent);

export default WithFormHandler

License

These libs and it's source code is distribute using MIT license. You can read the license here

Contributing

FAQs

Package last updated on 26 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts