Index: trunk/extensions/Validator/Validator_Functions.php |
— | — | @@ -145,7 +145,8 @@ |
146 | 146 | } |
147 | 147 | |
148 | 148 | /** |
149 | | - * Wrapper for the native is_float function. |
| 149 | + * Returns if the value is a floating point number. |
| 150 | + * Does NOT check the type of the variable like the native is_float function. |
150 | 151 | * |
151 | 152 | * @param $value |
152 | 153 | * @param array $metaData |
— | — | @@ -153,6 +154,6 @@ |
154 | 155 | * @return boolean |
155 | 156 | */ |
156 | 157 | public static function is_float( $value, array $metaData ) { |
157 | | - return is_float( $value ); |
| 158 | + return preg_match( '/^\d+(\.\d+)?$/', $value ); |
158 | 159 | } |
159 | 160 | } |
Index: trunk/extensions/Validator/Validator.php |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | die( 'Not an entry point.' ); |
26 | 26 | } |
27 | 27 | |
28 | | -define( 'Validator_VERSION', '0.3 a3' ); |
| 28 | +define( 'Validator_VERSION', '0.3 a4' ); |
29 | 29 | |
30 | 30 | // Constants indicating the strictness of the parameter validation. |
31 | 31 | define( 'Validator_ERRORS_NONE', 0 ); |