Return to Snippet

Revision: 10592
at January 5, 2009 09:57 by sveggiani


Initial Code
// name:		evValidFloat
// version:		v0.1
// description:		chequea que sea un float

function evValidFloat( $val ) {

	if ( preg_match( '/^[0-9]+(?:\.[0-9]{2})?$/', $val ) ) return true;
	else return false;

}

Initial URL

                                

Initial Description

                                

Initial Title
evValidFloat | checks if a given string has a valid FLOAT format

Initial Tags

                                

Initial Language
PHP