JamesMoss\Flywheel\NestedRepository::validateId PHP Method

validateId() protected method

Checks to see if a document ID is valid
protected validateId ( string $id ) : boolean
$id string The ID to check
return 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);
    }