Creating Custom Validation Rule For Entity Object in ADF

Hi All, In this post we will see how we can create the custom validation rule in ADF. In Entity Object we have already many inbuilt validation rules like "Collection, Compare, Key Exist, Length" etc.. But suppose we have the requirement of createting our own validation rules then you can create it in this way. First of all create a Fusion Web Application and then right click on "Model" project and select "new" option. From Categories tab select "ADF Business Component" and then select item as "Validation Rule" as shown below. Give the Name of validation Rule class "Name" and "Rule Display Name" according to your requirement. Now click on Ok. Now suppose if you have to validate the salary that the salary should not be greater than 100000. Then to do so you have to write the validation logic inside your rule validator class. You validation rule class will look like somewhat as shown below....