patrickhulce / klay

Extensible data modeling and validation library for JavaScript.
MIT License
2 stars 0 forks source link

figure out how to allow format options/descriptions #88

Open patrickhulce opened 6 years ago

patrickhulce commented 6 years ago

ideas

context.state()
  .describe({
    abbreviated: true,
    flavor: StateFlavor.Abbreviated,
    description: 'The two-letter state code',
  })

context.streetAddress()
  .describe({
    flavor: StringFlavor.StreetAddress,
    description: 'Street address excluding city, state, zip'
  })

context.mailingAddress()
  .describe({
    description: 'Full Street address including city, state, zip'
  })

context.state()
  .formatOptions({
    abbreviated: true,
  })