balderdashy / waterline-docs

WARNING: The content in this repo is out of date! See https://github.com/balderdashy/sails-docs for the most up-to-date documentation
452 stars 161 forks source link

Clarify difference between `required` and `notNull` #86

Open dmarcelino opened 9 years ago

dmarcelino commented 9 years ago

Continuing balderdashy/waterline#1012 here, clarify in the docs the difference between attribute validations required and notNull. It may be worth waiting for https://github.com/balderdashy/waterline/issues/1047#issuecomment-111140584 to be resolved as the behaviours may change slightly.

Original request:

@aars: Could we have a mention of what validation properties are input validation, db constraints and/or both? For example required is only used in input validation and does not reflect on the database. notNull on the other hand is used for both input validation and set as a db constraint (where supported).