Meta Box
Support Forum
Support › MB User Profile › Blacklist of domains for registration form
Hi!
How to add blacklist domains for registration form: @domain1.com, @domain2.com, @domain3.com A very useful function for MB User Profile
Thank you
Hi Roman Vader,
Thank you for reaching out.
You can use the form filters to validate any user field before creating a new user. For example, the user name abc123 will not be created/updated.
abc123
add_filter( 'rwmb_profile_validate', function( $is_valid, $config ) { if( $_POST['user_login'] == 'abc123' ) { $is_valid = false; } return $is_valid; }, 99, 2 );
Get more details on this documentation https://docs.metabox.io/extensions/mb-user-profile/#form-fitlers.