Consider I have 4 fields. Field 1, Field 2, Field 3, Field 4. Field 3 is displayed(rendered) on the page based on the selections of Field 1 and Field 2. Field 4 is displayed based on some selections of Field 1 and Field 2. And both Field 3 and 4 are displayed based on some other selections of first 2 fields. Now I want to validate all those fields and if all fields are selected then a alert box should be displayed.
Now, I don't want to use required as true as it is giving me rendering issues. I using apex for logic based on which the fields are displayed and I am having save method in apex. The main issue I am having with is when I click submit button the validation rule fails or the alert box doesn't show up. If anyone can show me a sample example I would really appreciate it. The alert box should appear only when all picklists fields are selected and then saved.