WordPress at a glance
function is not described

rest_sanitize_request_arg() WP 4.7.0

Sanitize a request argument based on details registered to the route.

No Hooks.

Return

Mixed.

Usage

rest_sanitize_request_arg( $value, $request, $param );
$value(mixed) (required)
$request(WP_REST_Request) (required)
$param(string) (required)

Code of rest sanitize request arg: wp-includes/rest-api.php VER 5.1.1

<?php
function rest_sanitize_request_arg( $value, $request, $param ) {
	$attributes = $request->get_attributes();
	if ( ! isset( $attributes['args'][ $param ] ) || ! is_array( $attributes['args'][ $param ] ) ) {
		return $value;
	}
	$args = $attributes['args'][ $param ];

	return rest_sanitize_value_from_schema( $value, $args );
}