user_profile_update_validate_nickname( $errors, $update, $user )
Validate nickname when updated and return error if invalid.
Description
Source
File: bp-xprofile/bp-xprofile-functions.php
function user_profile_update_validate_nickname( &$errors, $update, &$user ) { // Bail if not updating or already has error if ( ! $update || $errors->get_error_codes() ) { return; } $invalid = bp_xprofile_validate_nickname_value( '', bp_xprofile_nickname_field_id(), $user->nickname, $user->ID ); if ( $invalid ) { $errors->add( 'nickname_invalid', $invalid, array( 'form-field' => 'nickname' ) ); } }
Changelog
Version | Description |
---|---|
BuddyBoss 1.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.