mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
another update for bake model validations
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6584 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
a6fbe05964
commit
aac0cecf49
1 changed files with 2 additions and 2 deletions
|
@ -256,7 +256,7 @@ class ModelTask extends Shell {
|
|||
}
|
||||
}
|
||||
$methods = array_flip($choices);
|
||||
|
||||
|
||||
$prompt .= "{$skip} - Do not do any validation on this field.\n";
|
||||
$prompt .= "... or enter in a valid regex validation string.\n";
|
||||
|
||||
|
@ -282,7 +282,7 @@ class ModelTask extends Shell {
|
|||
$choice = $guess;
|
||||
}
|
||||
if ($choice !== $skip) {
|
||||
if (is_numeric($choice) && isset($options[$choice])) {
|
||||
if (is_numeric($choice) && isset($choices[$choice])) {
|
||||
$validate[$fieldName] = $choices[$choice];
|
||||
} else {
|
||||
$validate[$fieldName] = $choice;
|
||||
|
|
Loading…
Add table
Reference in a new issue