blindgaenger / properium

Define properties and their validations to create your model classes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

properium

Build Status

Define properties on your model class to validate them.

TODO

  • use validator.js for types => https://github.com/chriso/validator.js#validators
  • register own types
  • validate props for unknown properties (own dog food)
  • example im README
  • better /examples
  • TBD: use Object.defineProperty
  • TBD: required: false => makes prop optional
  • TBD: validate on toJSON
  • use types for type and subtype (not strings)
    • Undefined
    • Null
    • Boolean
    • String
    • Number
    • Object
      • Function
      • Array
      • RegExp

About

Define properties and their validations to create your model classes.


Languages

Language:JavaScript 100.0%