diff --git a/web/includes/functions.php b/web/includes/functions.php index 60fb99571..89d2cc8ad 100644 --- a/web/includes/functions.php +++ b/web/includes/functions.php @@ -1990,6 +1990,10 @@ function requestVar($name, $default='') { // For numbers etc in javascript or tags etc function validInt($input) { + return preg_replace('/[^\-\d]/', '', $input); +} + +function validCardinal($input) { return preg_replace('/\D/', '', $input); }