protected function validateId($id) { // Similar regex to the one in the parent method, this allows forward slashes // in the key name, except for at the start or end. return (bool) preg_match('/^[^\\/]?[^\\?\\*:;{}\\\\\\n]+[^\\/]$/us', $id); }