fuel/core — Issue #702: Regex validation for named parameters in routes
Author: antitoxic
Created: 2011-12-02 13:07:36+00:00
State: open

It would be nice if the developer has the ability to set a regular expression for the named parameters in the url
For instance:

```php
'users/view',
// or alternatively...
'users/view/:id([0-9])' => 'users/view',
// or alternatively...
'users/view/:id' => array( 'users/view', array(':id'=>':num'))
);
```

If the named parameter doesn't match the regular expression in the brackets then continue looking for a matching route. Even if the syntax won't be the same - just to have the ability to restrict this.

I know currently : matches an entire url segment but this feature will save some **repetative** code writing:

* no check for the parameter or at least less checks
* no need to fire 404 manually
* better separation of logic as we ultimately don't want not to enter the controller if the route doesn't really match