Validation on multiple fields

Certified Senior Developer

I have an editable grid containing two drop-down columns with other editable columns as well.

In grid, one drop-down value is mapped with another drop-down value. I need to put a validation that if that particular mapping already exists in DB then show mapping already exists only on click of submit button.

Let's say in DB values in one row are:

A (drop-down 1)    B (drop-down 2)       C (Text field)

              1                             2                            xyz

       

Then if user enters the same mapping of A and B, i.e. selects A as 1 and B as 2 in UI, then show mapping exists.

User can add multiple rows in editable grid through add row button and multiple mappings in grid can be added. It should be able to check for all rows and throw validation on row components where duplicate exists in DB.

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Senior Developer
    in reply to Deepak gupta

    I have this doubt where do I call this validation rule which checks the combination of multiple fields for any duplicates.

    Do I need to call this rule in each field component of combination in grid or is there any other way around.

    Let's suppose it's combination of column A and column B I am checking, do I need to call the rule in both A and B components. If so how, especially in case of editable grids?

Children