1.0.0 • Published 7 years ago

@salsita/react-forms v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

react-forms

Install

Install this package with npm

npm i @salsita/react-forms

or yarn

yarn add @salsita/react-forms

API

Modules

Functions

Interfaces

FormValidations

FormValidations.isEmail(value) ⇒ string | undefined

Validates an email address

Kind: static method of FormValidations
Returns: string | undefined - An error message

ParamTypeDescription
valuestring | undefinedThe input value

FormValidations.notEmptyString(message) ⇒ function

Creates a validation function that checks if the input value is not an empty string

Kind: static method of FormValidations
Returns: function - The validation function

ParamTypeDescription
messagestringThe error message

FormValidations.notEmptyObject(message) ⇒ function

Creates a validation function that checks if the input value is not an empty object

Kind: static method of FormValidations
Returns: function - The validation function

ParamTypeDescription
messagestringThe error message

FormFieldSelectProps

Kind: global interface
Properties

NameTypeDescription
labelstringLabel of the field

FormFieldProps

Kind: global interface
Properties

NameTypeDescription
typestringInput type
labelstringLabel of the field

formsReducer(state, action) ⇒ FormsState

The reducer of the forms module

Kind: global function

ParamTypeDescription
stateFormsStateThe state of redux-form
actionActionA redux action

FormFieldSelect(props)

A form field component for select

Kind: global function

ParamTypeDescription
propsFormFieldSelectPropsProperties

FormField(props)

A form field component for input

Kind: global function

ParamTypeDescription
propsFormFieldPropsProperties