Hi,
I have a situation where I need to validate the value of one variable based on the input provided in another variable. But I need to do this using Annotations. Below is the code for the same.
In the above code as you can see, "type" has two different values that is validated by
pattern matcher. And the "value" variable input depends on the value of "type" variable. The validation should look something like this
And for each of the above validation a different error should be displayed to the user. Like if wrong account number, then to user message should go as "Wrong Account Number" and if payee id pattern mismatches, then error should be displayed as "Wrong Payee ID".
All of the above should happen through annotations only. I tried with the below
But its' not working. I need only one message. Problem I am facing is if Payee Id is wrong, the message is coming as invalid account number.
Please help. This is very urgent
Thanks in advance
Dilip H Pashupathi