public FormValidation doCheckTemplateName(@QueryParameter String value) {
			if (value == null || value.trim().isEmpty()) {
				return FormValidation.error("Template is a required field.");
			}

			AbstractProject nearest = Project.findNearest(value);
			if(nearest == null || !value.equals(nearest.getName())) {
				return FormValidation.error("Project must exist.");
			}

			if(!(nearest instanceof BuildableItemWithBuildWrappers)) {
				return FormValidation.error("Project must explicitly be defined as a template.");
			}

			TemplateBuildWrapper wrapper = null;
			for (BuildWrapper buildWrapper : ((BuildableItemWithBuildWrappers) nearest).getBuildWrappersList()) {
				if(buildWrapper instanceof TemplateBuildWrapper) {
					wrapper = (TemplateBuildWrapper) buildWrapper;
					break;
				}
			}
			if(wrapper == null) {
				return FormValidation.error("Project must explicitly be defined as a template.");
			}

			return FormValidation.ok();
		}