VMware Cloud Community
qc4vmware
Virtuoso
Virtuoso
Jump to solution

vRA 8.4.2 Cloud template string input with a minimum length of zero still shows as required.

I'm trying to add some inputs to a cloud template that are optional free form strings.  I set the minimum length to 0 but they still come up as required input.  How do I get around this?  I don't want any default value I just want an empty string.  I tried making the default value a space but that didn't work either.

0 Kudos
1 Solution

Accepted Solutions
bdamian
Expert
Expert
Jump to solution

WOW! This was a nice one!

I've tested it in my lab and worked when I added the default value set to an empty string:

formatVersion: 1
inputs:
  TestString:
    type: string
    title: my test string
    default: ""

 

---
Damián Bacalov
vExpert 2017-2023 (7 years)
https://www.linkedin.com/in/damianbacalov/
https://tecnologiaimasd.blogspot.com/
twitter @bdamian

View solution in original post

3 Replies
bdamian
Expert
Expert
Jump to solution

WOW! This was a nice one!

I've tested it in my lab and worked when I added the default value set to an empty string:

formatVersion: 1
inputs:
  TestString:
    type: string
    title: my test string
    default: ""

 

---
Damián Bacalov
vExpert 2017-2023 (7 years)
https://www.linkedin.com/in/damianbacalov/
https://tecnologiaimasd.blogspot.com/
twitter @bdamian
qc4vmware
Virtuoso
Virtuoso
Jump to solution

Interesting... the parser allows one to leave default undefined I was missing the quotes.  Seems like if the default property is there the parser should throw an error.  This saves without any warning

my_input:
type: string
title: Duties
minLength: 0
default: 

But needed to be

my_input:
type: string
title: Duties
minLength: 0
default: ""

0 Kudos
xian_
Expert
Expert
Jump to solution

I tried to do the same with property groups, but was unable to define a default empty value for those. Even if I try to do it via vRLCM and editing in GIT.

Any luck with this?

0 Kudos