Wrap the field component and provide Props related to the form.
import React from 'react';
import { dripFormField } from 'react-drip-form';
const Field = (props) => {
  /* field component */
};
export default dripFormField(type, options)(Field);
      string'text'Specify the type of the field.  It is used when handling values.
The types that can be specified are as follows.
'text''checkbox''radio''select'input[type='***'].Note: In Type such as checkbox, radio, select etc. value handling is special, so if
typeis not specified, it will not behave as expected.
An object with the following properties.
Object{}You can specify the default Props For the wrapped component.
List of Props provided for wrapped components.
Apart from input andmeta, Props passed to the field component is passed as is.
An object with properties with the following field state.
Essentially all properties are Props which you need to assign to the field component.
stringThe name attribute of the field.
anyThe value of the field.
booleantrueA boolean indicating whether the field is checked.
It exists only if type isradio or checkbox.
It is a function for detecting change of a field.
Give the Event object or the changed value as argument.
It is a function for detecting the focus of the field.
It is a function for detecting blur in the field.
An object with properties with the following meta state.
stringIt is label of the field.
stringIf there are multiple errors, it will be the first error.
string[]All error strings held by the field.
booleanIt is true if all validation associated with the field is passed.
booleanThe opposite of meta.valid.
booleantrue if the field is touched even once.
input.onBlur() is used to determine if you are touching.
booleanThe opposite of meta.untouched.
booleantrue if the value of any field has been changed.
booleanThe opposite of meta.dirty.
booleantrue if the field is validating.
Components after wrapping can specify the following Props.
All other than Props below are passed directly to Props.
stringtrueA string representing the name of the field.
The string specified here will be used as a subscript to values.
anyfalseSpecify the value of the field.
The value specified here will be used as the initial value.
Also, if it is detected that componentWillReceiveProps() is not equivalent, overwrite the current form value.
stringnullfalseSpecify the label of the field. It is mainly used in error messages.
(value: any, name: string): anynullfalseSpecify a function for parsing the handled value.
It is called after input.onChange () is executed.
(value: any, name: string): any(value: any): any => value == null ? '' : valuefalseSpecify the function that formats the value used for display.
It is called with render (). (It is just before passing it to Props of WrappedComponent)
ObjectnullfalseYou can specify a validation rule.
Please refer to drip-form-validator Built-in Rules for specifiable rules.
<Field
  name="username"
  validations={{
    required: true,
    max: 255,
  }}
/>
      ObjectnullfalseYou can specify Normalizers.
Please refer to drip-form-validator Built-in Normalizers for specifiable rules.
<Field
  name="rating"
  normalizers={{
    between: {
      min: 0,
      max: 100,
    },
  }}
/>
      ObjectnullfalseSpecify the error message corresponding to the validation rule.
<Field
  name="username"
  messages={{
    required: 'Username is required!',
  }}
/>
      FunctionnullfalseCalled when the value of the field has changed. (After executing input.onChange ())
FunctionnullfalseCalled when the field is out of focus. (After executing input.onBlur ())
FunctionnullfalseCalled when the field is focused. (After executing input.onFocus())