Ver original$pre = '/([1234567890])+$/'; $errors = array();foreach($precios as $price){ if(!preg_match($pre, $price)){ $errors[] = sprintf('value :: %s :: isn\'t valid', $price); }}