Validate on Update related action

I have used validation while creating a new entry in the grid which shows a message in case of duplicacy in entered field. But when I use the same validation in the update related action , it shows the duplicacy message  as soon as we click on update, even before actually updating it. How to resolve this? I want validation to occur when i enter the data, not when I it automatically loads the data

  Discussion posts and replies are publicly visible