Permalink
Browse files

Add numeric validator for float fields by default.

Make bake add numeric validator to float fields.

Fixes #2163
  • Loading branch information...
1 parent c08df2a commit bcafde6212a8614d69e9c399197166c67eb0b0d1 @markstory markstory committed Oct 21, 2013
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/Cake/Console/Command/Task/ModelTask.php
@@ -438,6 +438,8 @@ public function fieldValidation($fieldName, $metaData, $primaryKey = 'id') {
$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') {

0 comments on commit bcafde6

Please sign in to comment.