fix validInt to take negative integers. Introduce validCardinal to handle positive integers
This commit is contained in:
parent
75a014321e
commit
c72d34f176
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue