From 9ddaa3d43868d82f33042c35feb5fb49b7a9fffe Mon Sep 17 00:00:00 2001 From: lpotherat Date: Tue, 30 May 2017 16:25:56 +0200 Subject: [PATCH] validateFilters allow multi-letters filter names Allow filters like these - :id - :hash --- src/Route.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Route.php b/src/Route.php index 16bf99e..00f0b84 100755 --- a/src/Route.php +++ b/src/Route.php @@ -169,7 +169,7 @@ private function substituteFilter($matches) private function validateFilters() { foreach($this->filters as $key => $reg) { - if(!preg_match('~^:([[a-z]])$~i', $key)) { + if(!preg_match('~^:([a-z]+)$~i', $key)) { throw new Exception('Invalid filter name `'.$key.'` it should contains only letters and start with `:`'); } }