       if campaignInitialAmount is 0
         return callback null, { isValid: yes, campaign }
 
-      # if campaign has more disk space
-      if campaignGivenAmount > campaignInitialAmount
+      # if campaign hit the limits
+      if campaignGivenAmount + campaignPerEventAmount > campaignMaxAmount
+        console.info "hit the max amount for #{campaignName} campaign"
         return callback null, isValid: no
 
       return callback null, { isValid: yes, campaign }
+
+
+  @isCampaignValid = (campaignName, callback)->
+    isCampaignValid campaignName, callback
+
 
 
   increaseGivenAmountSpace:(size, callback)->

      callback null, campaign


  @isCampaignValid = isCampaignValid = (campaignName, callback)->

    unless callback
      [campaignName, callback] = [DEFAULT_CAMPAIGN, campaignName]


      campaign = new JReferralCampaign data
      campaign.save (err)->

        if err then callback err
        else callback null, campaign


  update$: permit 'manage campaign',
