Skip to content

Commit

Permalink
Add numeric validator for float fields by default.
Browse files Browse the repository at this point in the history
Make bake add numeric validator to float fields.

Fixes #2163
  • Loading branch information
markstory committed Oct 21, 2013
1 parent c08df2a commit bcafde6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Cake/Console/Command/Task/ModelTask.php
Expand Up @@ -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') {
Expand Down

0 comments on commit bcafde6

Please sign in to comment.