Browse Source

Update bake generated code to use new validator api.

mark_story 12 years ago
parent
commit
d074f7104b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Console/Templates/default/classes/table.ctp

+ 1 - 1
src/Console/Templates/default/classes/table.ctp

@@ -83,7 +83,7 @@ $key = array_map(function($el) { return "'$el'"; }, (array)$primaryKey);
 			->allowEmpty('<?= $field ?>')<?= $i === $countValidation ? ";\n" : "\n" ?>
 <?php else: ?>
 			->validatePresence('<?= $field ?>', 'create')
-			->allowEmpty('<?= $field ?>', false)<?= $i === $countValidation ? ";\n" : "\n" ?>
+			->notEmpty('<?= $field ?>')<?= $i === $countValidation ? ";\n" : "\n" ?>
 <?php endif ?>
 <?php $i++; ?>
 <?php endforeach ?>