protected validateId ( string $id ) : boolean | ||
$id | string | The ID to check |
Résultat | boolean | True if valid, otherwise false |
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);
}