diff options
| author | Jules Laplace <jules@okfoc.us> | 2016-03-28 13:59:50 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2016-03-28 13:59:50 -0400 |
| commit | 8898bbe48285c7f9f11760ef420cca43d683d5e0 (patch) | |
| tree | 00a2e6c49ddd6894c60e893bfd8426363a3d4a05 /app/node_modules/okschema/index.js | |
| parent | 57026202f9ac0b98cc744734a04bcee362b789a3 (diff) | |
modify links field to specify text and uri
Diffstat (limited to 'app/node_modules/okschema/index.js')
| -rw-r--r-- | app/node_modules/okschema/index.js | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/app/node_modules/okschema/index.js b/app/node_modules/okschema/index.js index 330ad6b..82aa13f 100644 --- a/app/node_modules/okschema/index.js +++ b/app/node_modules/okschema/index.js @@ -63,8 +63,21 @@ var types = { assertValid: function(spec, value) {} }, 'tag-list': { - parent: 'string', - assertValid: function(spec, value) {} + parent: [{ + uri: { type: 'string' }, + text: { type: 'string' } + }], + assertValid: function(spec, value) { + var message; + var actual; + if (!value || !value.length) { + throw [{ + message: 'Not an array', + expected: JSON.stringify(this.parent), + actual: value + }]; + } + } }, 'date': { parent: 'string', |
