rcp_form_errors

Note: This is part of the developer docs and is considered custom code.
Unfortunately, we cannot provide support for custom code at this time as we do not have the additional resources that would be necessary to provide support for custom code.

If you need assistance with this, please reach out to our list of consultants for further assistance:
https://codeable.io/developers/restrict-content-pro/
This happens just after the registration form is validated. It allows you to show errors for custom fields you have added.
Parameters:

$_POST – Array of all information sent with the form.

Example:
This example shows adding a custom registration field (checkbox) with rcp_after_register_form_fields and validation that sets an error if the checkbox isn’t checked.
/**
* Add checkbox to registration form.
*
* @return void
*/
function ag_rcp_after_register_form_fields() {
?>


add( ‘sample_field_required’, __( ‘You must check this field’, ‘rcp’ ), ‘register’ );
}
}

add_action( ‘rcp_form_errors’, ‘ag_rcp_form_errors’ );

Have more questions?

Submit a request