Text formatted line item duplication
I have a line item which is text formatted. User enters values like Apple, mango and apple again.
For the 3rd value(apple)- it should show me an msg pop up, that it exists already.
Please can anyone help me on how to write logic for line item 2.