Handle multiple validation on field.


I have a field that has a lookup to select value from. There is a validation written on canSelectClosed() of the lookup form. I wrote one more validation on datasource → field → validate() to validate the input given by user manually without using lookup.

Now the problem is, when the user types in manually it checks the validate() and the error is thrown once. But if the user selects through lookup, it’s executing the validation written on canSelectClosed() as well as the code written on validate() of the field. this is making it throw the error twice.

How can I fix this, and is there in any way to find the source of value that is coming from when it comes to validate() of the field.

Thanks in advance,

Your help in this regard would be highly appreciated.

you can just put the what ever validation logic in validate method. Why do you need a validation on canSelectClosed() method

The code in canSelectClosed() is already written as part of lookup form, that is being used for an EDT. So, I can’t remove the code from there. Looking for an alternative solution than rather bypass the validation from this caller.