Add frontside support for locale dependent number validation (#788)

This commit is contained in:
jekkos
2016-08-09 18:20:52 +02:00
parent 597a5caee5
commit 8b08bf5daa
6 changed files with 33 additions and 21 deletions

View File

@@ -50,7 +50,21 @@ class Secure_Controller extends CI_Controller
return $this->security->xss_clean($str, $is_image);
}
}
function numeric($str)
{
return parse_decimals($str);
}
public function check_numeric()
{
$result = TRUE;
foreach($this->input->get() as $str) {
$result = parse_decimals($str);
}
echo $result !== FALSE ? 'true' : 'false';
}
// this is the basic set of methods most OSPOS Controllers will implement
public function index() { return FALSE; }
public function search() { return FALSE; }