HenrikHL
3 years agoFrequent Contributor
Restrict string lengths in arrays
Hi,
I was wondering if it is possible to restrict length of strings in arrays? I have the following structure:
shippingMarks:
  type: array
  minItems: 1
  description: 'List of `ShippingMarks`...'
  example: ['Made in China']
  items:
    type: stringThis would allow the following:
shippingMarks: ['Made in China']
I would like to limit the maxLength of the strings inserted into the array - how is this done?