UI PATH FORM DESIGNER

Hi Guys, I am using Form Designer in UI path to capture user data. Now I’m primarily using this for creating user accounts. In many cases a user may enter the same information to create account leading to duplicate records, here this is what I want to prevent. So, if an account with the same details already exists, how do I keep the user on the form with all his pre entered data, throw him an error message saying duplicate details and allow him to move forward/submit only when the details are unique. Any help is appreciated guys, been stuck on this since some time now.