Expand my Community achievements bar.

SOLVED

guidebridge.validate()

Avatar

Level 1

guidebridge.validate() to validate multiple fields at dependent on each other at one time

1 Accepted Solution

Avatar

Correct answer by
Level 7

Hi,

You can use the guidebridge validate function with SOM expressions to validate individual fields or panels I believe: Adaptive Forms Class: GuideBridge

Perhaps you could group the fields in question into a panel, or validate them in turn based on their SOM expressions?

View solution in original post

2 Replies

Avatar

Correct answer by
Level 7

Hi,

You can use the guidebridge validate function with SOM expressions to validate individual fields or panels I believe: Adaptive Forms Class: GuideBridge

Perhaps you could group the fields in question into a panel, or validate them in turn based on their SOM expressions?

Avatar

Level 3

Hi swapnilg81543075​,

As far as I understand, you might have added validation rule to one of the form fields,but the validation rule uses value of other field for validation. In this case you should use field1.validate(), this will automatically validate field1 against field2.

If you have multiple such field combinations, and are adjacent to each other(to be accomodated inside a panel then wrap them in a panel and use below mentioned rules.

  • If you are doing this from rule editor, you should preferably use panelName.validate(), which will be better and cleaner approach.

  • If you are doing it from some other javascript, you should use guidebridge.validate(eList, //SomExpression to the panel, true) or guidBridge.resolveNode("panelName").validate();

If the fields are not adjacent, use field1.validate();field3.validate();

Thanks,

Jagjeet

AEM Forms Blog