mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Merge branch 'TheHollidayInn-api-v3-challenge-shortname-validation' into api-v3
This commit is contained in:
@@ -120,6 +120,8 @@ habitrpg.controller("ChallengesCtrl", ['$rootScope','$scope', 'Shared', 'User',
|
||||
$scope.save = function(challenge) {
|
||||
if (!challenge.group) return alert(window.env.t('selectGroup'));
|
||||
|
||||
if (!challenge.shortName || challenge.shortName.length < 3) return alert(window.env.t('shortNameTooShort'));
|
||||
|
||||
var isNew = !challenge._id;
|
||||
|
||||
if(isNew && challenge.prize > $scope.maxPrize) {
|
||||
|
||||
Reference in New Issue
Block a user