You are here

constant ResourceVersionRouteEnhancer::VERSION_IDENTIFIER_VALIDATOR in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/jsonapi/src/Revisions/ResourceVersionRouteEnhancer.php \Drupal\jsonapi\Revisions\ResourceVersionRouteEnhancer::VERSION_IDENTIFIER_VALIDATOR

Resource version validation regex.

@todo When D8 requires PHP >=5.6, convert to expression using the VersionNegotiator::SEPARATOR constant.

File

core/modules/jsonapi/src/Revisions/ResourceVersionRouteEnhancer.php, line 63

Class

ResourceVersionRouteEnhancer
Loads an appropriate revision for the requested resource version.

Namespace

Drupal\jsonapi\Revisions

Code

const VERSION_IDENTIFIER_VALIDATOR = '/^[a-z]+[a-z_]*[a-z]+:[a-zA-Z0-9\\-]+(:[a-zA-Z0-9\\-]+)*$/';