Skip to content

Commit

Permalink
Add validation guess for not null + text types.
Browse files Browse the repository at this point in the history
Fixes #2493
  • Loading branch information
markstory committed Jan 21, 2012
1 parent df5d9ac commit 70bb839
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 @@ -426,6 +426,8 @@ public function fieldValidation($fieldName, $metaData, $primaryKey = 'id') {
$guess = $methods['uuid'];
} elseif ($metaData['type'] == 'string') {
$guess = $methods['notempty'];
} elseif ($metaData['type'] == 'text') {
$guess = $methods['notempty'];
} elseif ($metaData['type'] == 'integer') {
$guess = $methods['numeric'];
} elseif ($metaData['type'] == 'boolean') {
Expand Down

0 comments on commit 70bb839

Please sign in to comment.