Hi, i need to check a custom field (phone number) during registration process.
Now i check custom field with hook
The workflow is:
if user insert a phone number that already in db i delete user, and redirect user to another custom page, with error message.
But i don't really like this workflow, because user must return into registration page and do again the entire registration process.
i think the best solution is: after submit the form, and phone number is already in db, form return into previous page where user insert data without loosing data , name, email etc. The behaviour would be the same as the default error, like, for example, username exits that return into registration page and display error on the top.
How to return error like default error ? What hook i need? .