You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var schema = {type:'array', items: {type:['string', {type:'object'} ]}};
undefined
var strings = ["a","b","c","d"];
undefined
var objects = [{a:'a'},{b:'b'}];
undefined
var cb=function(error){console.log(error);}
undefined
validator.validate(strings, schema, cb);
undefined
undefined
validator.validate(objects, schema, cb);
Error: Type 'string,[object Object]' is not supported.
at C:\Documents and Settings\raphael\node_modules\amanda\releases\latest\amanda.js:1050:23
at Array.some (native)
at Object.type (C:\Documents and Settings\raphael\node_modules\amanda\releases\latest\amanda.js:1047:42)
at C:\Documents and Settings\raphael\node_modules\amanda\releases\latest\amanda.js:1736:32
at C:\Documents and Settings\raphael\node_modules\amanda\releases\latest\amanda.js:86:24
at C:\Documents and Settings\raphael\node_modules\amanda\releases\latest\amanda.js:78:30
at C:\Documents and Settings\raphael\node_modules\amanda\releases\latest\amanda.js:1744:20
at C:\Documents and Settings\raphael\node_modules\amanda\releases\latest\amanda.js:86:24
at C:\Documents and Settings\raphael\node_modules\amanda\releases\latest\amanda.js:78:30
at C:\Documents and Settings\raphael\node_modules\amanda\releases\latest\amanda.js:1744:20
The text was updated successfully, but these errors were encountered:
Hello,
In the https://github.com/Baggz/Amanda/blob/master/docs/json/comparison.md file, one can see in the union types, the element of the array can be a schema.
But it seems that is not currently supported :
C:\Documents and Settings\raphael>node -v
v0.6.15
C:\Documents and Settings\raphael>npm -v
1.1.16
C:\Documents and Settings\raphael>npm install amanda
npm http GET https://registry.npmjs.org/amanda
npm http 304 https://registry.npmjs.org/amanda
amanda@0.4.2 ./node_modules/amanda
C:\Documents and Settings\raphael>node
The text was updated successfully, but these errors were encountered: