       { template, templateDetails, rawContent } = data
 
       if template?
+
+        if validationError = validateTemplate template, group
+          return callback validationError
+
         data.template = generateTemplateObject \
           template, rawContent, templateDetails
 

    }


  @create = permit 'create stack template',

    success: revive


      unless data?.title
        return callback new KodingError 'Title required.'

      if validationError = validateTemplate data.template, group
        return callback validationError

      stackTemplate = new JStackTemplate
        originId    : delegate.getId()
