Browse Source

Add numeric validator for float fields by default.

Make bake add numeric validator to float fields.

Fixes #2163
mark_story 12 years ago
parent
commit
bcafde6212
1 changed files with 2 additions and 0 deletions
  1. 2 0
      lib/Cake/Console/Command/Task/ModelTask.php

+ 2 - 0
lib/Cake/Console/Command/Task/ModelTask.php

@@ -438,6 +438,8 @@ class ModelTask extends BakeTask {
 					$guess = $methods['notEmpty'];
 				} elseif ($metaData['type'] === 'integer') {
 					$guess = $methods['numeric'];
+				} elseif ($metaData['type'] === 'float') {
+					$guess = $methods['numeric'];
 				} elseif ($metaData['type'] === 'boolean') {
 					$guess = $methods['boolean'];
 				} elseif ($metaData['type'] === 'date') {