I need to check for a form input value to be a positive integer (not just an integer), and I noticed another snippet using the code below:
$i = $user_input_v
Laravel 4.2 Validation rule for positive number
It takes only positive numbers including float values.
public static $rules = array( 'field_name' => 'required|regex:/^\d*\.?\d*$/' );
e.g:20,2.6,06