Hi,
I understand what you looking for, but want some more details too.
you said when user input wrong data can do a pop up message,
so what kind a message ? alert box? or html pop up box?
its better if you can show me a example (ex: I want like Facebook registration). so i can do what you really looking for.