i have a function which is supposed to check if a number is a floating-point number.
this is the structure of the function
function isValidFloat( $string ){
if( !preg_match( "/^[0-9]+(.[0-9]+)?$/", $string ) ){
return false;
}
}
for numbers such as 1 or 8 it's correctly validating but not for floating point numbers such 19.25. where am i missing it