We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d9c2ea1 commit dc689ebCopy full SHA for dc689eb
common/models/Team/Validator/Unique.php
@@ -28,7 +28,8 @@ protected function validateAttribute($team, $attribute)
28
$criteria
29
->addCond('_id', '!=', $team->_id)
30
->addCond('name', '==', new \MongoRegex('/^' . preg_quote($name) . '$/i'))
31
- ->addCond('year', '==', $year);
+ ->addCond('year', '==', $year)
32
+ ->addCond('isDeleted', '==', false);
33
$team2 = Team::model()->find($criteria);
34
35
// If 2nd team exists then add error
0 commit comments