Viewing 1 replies (of 1 total)
  • Plugin Contributor Alessandro Tesoro

    (@alessandrotesoro)

    Hi @azizul-karim-aec

    Add the following code to your theme’s functions.php file.

    
    add_filter(
    	'submit_wpum_form_validate_fields',
    	function( $pass, $fields, $values, $form ) {
    		if ( $form === 'profile' && isset( $values['account']['user_description'] ) && strlen( $values['account']['user_description'] ) > 250 ) {
    			return new WP_Error( 'user_description_error', 'Description has more than 250 characters.' );
    		}
    		return $pass;
    	},
    	10,
    	4
    );
    
Viewing 1 replies (of 1 total)

The topic ‘Limit user description length in characters’ is closed to new replies.