elixir-cloud-aai/cloud-components

triage: required mark (*) on array inputs missing

Closed this issue · 3 comments

Description

The asterisk (*) is not visible for inputs in the form component of array type with children.

Possible solution(s)

@JaeAeich The asterisk implies that the field is required. The array is not an input type and cannot be required, only its children can be. Is there an underlying issue that might be caused by this?

@SalihuDickson yeah but it is more intuitive as some forms have array field that is required. Having an asterisk (*) near it . Check out @uniqueg's suggestions in here.

Yes, in that example, at least one executor and at least one command are required (see specs for tesTask and tesExecutor), so I do think it makes sense (and is more intuitive) to put asterisks on the "Executors" object and "Commands" array, respectively, in those cases:

image.

However, there are also scenarios where an object is not required, but once there is at least one item included, it will require individual properties. In those cases, I think there should be no asterisk on the outer object.