[eluser]pistolPete[/eluser]
[quote author="dobomode" date="1234763679"]I want to validate the third segment - <b>423</b> - and ascertain that it's an integer before passing to a where clause of a SQL statement.
[/quote]
There isn't such thing like URI segment validation, but you can easily do it yourself:
Code:
// controller: view
public function post($value)
{
if(is_numeric($value))
{
// call model to select data
}
}
[quote author="dobomode" date="1234763679"]
Also, I would want to make sure somebody doesn't manually insert in some hack string[/quote]
If you restrict the permitted_uri_chars like that, all attempts to submit a "hack string" are blocked:
Code:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_-';