As i'm working on grails framework but not using controller.My application is "Single Page Application".I dont want to reload my page so I have written service i.e RegistrationService with Ajax calling. So i'm using knockout for data-binding.Database using is postgresql . I have a view page where i'm having an email field. When i'm entering a duplicate email id and clicking save button then i can see a validation error i.e "Email has already been taken" but even if i'm writing a unique id then also i'm getting the same validation error.This is because its going in error condition in modalModal.js page, So I'm not getting how to fix this problem.I just want when i enter unique id and click save button then it should not given validation error.As i'm working on grails framework but not usin