npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vdr-react-form-manager

v1.1.6

Published

Form manager

Readme

vdr-react-form-manager

vdr-react-form-manager is a form manager for React. With vdr-react-form-manager you can:

  • Manage forms
  • Manage inputs validation
  • Manage cross form inputs validation
  • add/remove/update inputs

Show it in action

Visit vdr-react-form-manager-sandbox website to see several examples of how to use the library.

Installation

  • npm
    • npm install -save vdr-react-form-manager
  • yarn
    • yarn add -save vdr-react-form-manager

Recommandation

  • Even if is possible to use vdr-react-form-manager for react js project, we precognize to use it with typescript

How use it

const { resetForm handleFormChange getFormValues getInputProps addInputs updateInputs removeInputs validateInputs updateFormProps emitLastFieldUpdated lastFieldUpdated isFormDisabled isFormValid isFormTouched isFormPristine formErrors formCustomsProps } = useFormManager(IFormInitalState)

IFormInitalState: is an object containing the initial form properties

| Operation | usage | return value | description | | -------------------- | ------------------------------------- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | resetForm | resetForm() | void | reset the form with the initialValues | | handleFormChange | handleFormChange(onformOnChangeEvent) | void | Pass the formOnChangeEvent to this method | | getFormValues | getFormValues() | { k : v } | return an object with form valuesk : input namev : input value(s) | | getInputProps | getInputProps(x) | input properties | return the input propertiesx : input name | | addInputs | addInputs({ k : v }) | void | add new input(s)k : input namev : input properties | | updateInputs | updateInputs({ k : v }) | void | update input(s)k : input namev : input properties to update | | removeInputs | removeInputs(x) | void | remove input(s)x : array of input name | | validateInputs | validateInputs(x) | void | will check the validity of your form and inputs. Each input.errors and formErros will be regenared,x : null = all inputs will be checkedx : string[] = only the inputs is the list will be checked | | updateFormProps | updateFormProps(x) | void | update the form propertiesx : FormProperties | | emitLastFieldUpdated | emitLastFieldUpdated(x) | void | configure if you want to receive the name of the latest input updatedx : true -> lastFieldUpdated will be settedx : false -> lastfieldUpdated = nulldefault is true | | lastFieldUpdated | lastFieldUpdated | { inputName: x } or null | x : contains the name of the latest input updated if emitLastFieldUpdated = truereturn null if emitLastFieldUpdated = false | | isFormDisabled | isFormDisabled | boolean | contains the form disabled status | | isFormValid | isFormValid | boolean | contains the form validity status | | isFormTouched | isFormTouched | boolean | The form has been touched | | isFormPristine | isFormPristine | boolean | The form has not been modified yet | | formErrors | formErros | x | contains the form errorsx : empty array if no errorsx : string[] array of string if the form has errors | | formCustomsProps | formCustomsProps | { k : v } | return an object with form valuesk : keyv: value |

IFormInitialState

const { .... } = useFormManager(IFormInitialState)

You need to pass has parameter an object containing the initials props of your form.

|PropertyName|type|description|optional| |-|-|-|-| |formInputs| IStateInputs | Object containing the inputs properties |false| |formValidators|array[IFormValidator]|Array containing functions which implement IFormValidator in order to validate the form|true| |formCustomsProps| object{ k : v }|k : custom property namev : custom property value|true| |formClassNames|string[]|Array of strings who contains the initial form classes|true|

IStateInputs: {K, V} object

Object containing the inputs properties

k : input name v : input properties object

input properties

|PropertyName|type|description| optional| |-|-|-|-| |name|string| input name name - required and unique|false| |id|string|input id|true| |value|any|input value|true| |label|string|string who contains the input label|true| |isValid|boolean| the input content is valid|true| |errors|string[]|contains the input erros.Empty array if no errors|true| |disabled|boolean|contains the input disabled status|true| |classNames|string[]|contains the input classes|true| |validators|IFormInputValidator[]|Array containing functions which implement IFormInputValidator in order to validate the input|true| |availableValues|IFormInputAvailableValue[]|Array containing objects which implement IFormInputAvailableValue in order to manage selectbox and multiple checkboxes|true| |customProps|IKeyAny|object{ k : v }|k : custom property namev : custom property value|true| |updateId|string|random string who changes every time that the input value changes.Ex: You can use this field to implement areequals function for React.memo|true| |isTouched|boolean|The input has been touched|true| |isPristine|boolean|The input has not been modified yet|true|

GitHub examples

Contains examples to manage a form using the library https://github.com/valentino-drappa/vdr-react-form-manager-sandbox