VMware Cloud Community
Czernobog
Expert
Expert
Jump to solution

vRO 6 - input validation in user presentation

Hi,

I need to do some input validation in a user presentation, that will get imported later into vRA 6.

The user has to input some information in a form and there are 3 input fields. At least one of the fields has to be filled with input, so that the workflow can proceed.

How can I force at least one of the 3 fields to be mandatory? It can be any of the fields also optionally 2 or all. Can this be done without an action running in the background?

Thanks!

Reply
0 Kudos
1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi,

One possible way to achieve this is the following:

Let's assume there are 3 input fields of type string, named p1, p2 and p3. In the presentation editor, add a property of type 'Custom validation' with value

 

(#p1==null && #p2==null && #p3==null) ? "At least one field should have value" : null

to each of the input parameters p1, p2 and p3.

View solution in original post

Reply
0 Kudos
2 Replies
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi,

One possible way to achieve this is the following:

Let's assume there are 3 input fields of type string, named p1, p2 and p3. In the presentation editor, add a property of type 'Custom validation' with value

 

(#p1==null && #p2==null && #p3==null) ? "At least one field should have value" : null

to each of the input parameters p1, p2 and p3.

Reply
0 Kudos
Czernobog
Expert
Expert
Jump to solution

Thanks, this works well in vRO. The validation is not carried over to vRA though, that is another shortcoming of the vRO-vRA integration:(

Reply
0 Kudos