public function integer($str)
{
return (bool) preg_match('/^[\\-+]?[0-9]+$/', $str);
}
public function money($str) { //First check if decimal if (!parent::decimal($str)) { //Now check if integer return (bool) parent::integer($str); } return TRUE; }