@traveloka/validation
TypeScript icon, indicating that this package has built-in type declarations

3.6.0 • Public • Published

React Schema

Installation

yarn

yarn add @traveloka/validation

npm

npm i @traveloka/validation --save

Rules

  • required
  • maxLength(length: number)
  • or(rules: Rule | Rule[])

Example study case

  • Password length minimal 5 character
  • Password must contain at least one symbol or number
<Field
  component={TextInput}
  rules={[
    minLength(5),
    or([
      containSymbol,
      containNumber
    ])
  ]} />

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.6.0
    4
    • latest

Version History

Package Sidebar

Install

npm i @traveloka/validation

Weekly Downloads

240

Version

3.6.0

License

MIT

Unpacked Size

23.3 kB

Total Files

45

Last publish

Collaborators

  • traveloka-engineering
  • district-engineering
  • angga