Forum Discussion

HenrikHL's avatar
HenrikHL
Frequent Contributor
2 years ago
Solved

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: string

This 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?

  • Yes that is a known issue in automation for Excel

    Opening a 2013 file in 2016, even you if don't change anything, will cause Excel to bring up a box stating that the you have to accept that the file will be saved in the new 2016 format.

     

    My recommendation is to save the files as 2016 files once before you start the COM automation with Excel from inside of TestComplete

    Cheers

    -Lino