How does validationGroup work?

This should be a simple topic but I haven't been able to completely figure out how does the validationGroup work. For example, let's say I have a form with two sections. On the first section I have two fields and a buttonWidget. In another form I have two other fields with another button. The fields on the first section I have them as required=true but the fields on the second section are NOT required. If I leave the fields on the first section blank and I click on the button from the SECOND section, the validations will kick off on the first section. I DONT want this to happen. I want the sections to be independent. I tried adding validationGroup to the button and respective fields and the red * from the required fields are gone. Why are they gone when I add validationGroup? How can I make the buttons be independent for their given sections?

Why something so simple like this seems to be more complicated? Am I making it more complicated than what it actual...

OriginalPostID-205318

OriginalPostID-205318

  Discussion posts and replies are publicly visible

Parents
  • Hi Eric,

    As told by other practitioners in the above posts, it is correct that the * mark goes off when you add that particular component into the validation group of any button.

    However to make the buttons independent for their given sections, you can use different validation groups for both the buttons. For example, place all the components (buttons and the two fields) of the first section in one validation group, let's say "VAL1" and place all the components of the second section into another validation group like "VAL2".

    In this way, when you will click the first button (of the first section), only the fields belonging to the first section will be validated. Same goes for the second section, its fields will only be validated on the click of second button.

    Hope, this resolution satisfies your use case!
Reply
  • Hi Eric,

    As told by other practitioners in the above posts, it is correct that the * mark goes off when you add that particular component into the validation group of any button.

    However to make the buttons independent for their given sections, you can use different validation groups for both the buttons. For example, place all the components (buttons and the two fields) of the first section in one validation group, let's say "VAL1" and place all the components of the second section into another validation group like "VAL2".

    In this way, when you will click the first button (of the first section), only the fields belonging to the first section will be validated. Same goes for the second section, its fields will only be validated on the click of second button.

    Hope, this resolution satisfies your use case!
Children
No Data