1.9.37-alpha.0 • Published 5 years ago

@opium-react/form v1.9.37-alpha.0

Weekly downloads
40
License
MIT
Repository
github
Last release
5 years ago

@opium-react/form

Usage

const form = require('@opium-react/form');

Validation rules:

  • email
  • match
  • max
  • maxlength
  • maxChecked
  • min
  • minLength
  • minChecked
  • number
  • pattern
  • phone
  • required
  • async - get a method as a param and return result

Field Props:

fieldProps - will go to the fieldState - From field States id name className

Field States:

touched, pristine, required, validating, validatedSync, validatedAsync, valid, validSync, validAsync, invalid, errors,

Input class names:

'form-control', 'is-touched', 'is-pristine', 'is-validating', 'validated-sync', 'validated-async', 'is-valid', 'valid-sync', 'valid-async', 'is-invalid',