add_filter return value

Like so:

function my_validate_username( $valid, $username ) {
    $sanitized = sanitize_user( $username, false );
    $valid = ( $sanitized == $username );

    return $valid;
}

add_filter('validate_username', 'my_validate_username', 10, 2);

error code: 523