mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
Updated shortname validation to support multiple browsers
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