Yeah, errors would be way too far. I'm talking of falling back to the default (whatever it is) if a sane value isn't found. Regular expressions are an overkill, `ctype_digit()` is perfect in this case - just make sure that you cast to string whatever you're passing to it (I often forget to do so).
I don't want to get into the rsegment argument again ... we agreed on the solution already - talking about fallbacks here (which could include segment(3) as well).