Custom Field Check during registration

Hi, i need to check a custom field (phone number) during registration process.

Now i check custom field with hook ws_plugin__s2member_after_configure_user_registration.
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? .

Thanks
Massimo

i found the correct hook. I use paypal pro forms and so the filter ws_plugin__s2member_pro_paypal_form_submission_validation_response allow me check phone number.

1 Like