Array of enumerated type
Closed this issue · 1 comments
tshemsedinov commented
Long form
Schema: field: { type: 'array', enum: ['uno', 'due', 'tre'] }
Valid example: field: ['due', 'uno', 'uno', 'due']
Not valid example: field: ['due', 'quattro']
Shorthand
Schema: field: { array: { enum: [1, 2, 3] } }
Valid example: field: [2, 1, 3, 3, 2]
Not valid example: field: [2, 4, 1]
Specs: https://github.com/metarhia/Contracts/blob/master/doc/Metaschema.md#enumerated
georgolden commented
Done with #400