private void validate() {

		final String BAD = GhidraProjectUtils.ILLEGAL_FILENAME_CHARS;
		final String BAD_START = GhidraProjectUtils.ILLEGAL_FILENAME_START_CHARS;
		
		runConfigMemoryText.setEnabled(createRunConfigCheckboxButton.getSelection());
		runConfigMemoryText.setMessage(runConfigMemoryText.isEnabled() ? "default" : "");

		String message = null;
		String projectName = getProjectName();
		File projectDir = getProjectDir();
		boolean launchConfigExists = false;
		try {
			ILaunchConfiguration launchConfig = GhidraLaunchUtils.getLaunchConfig(projectName);
			if (launchConfig != null) {
				String launchConfigTypeId = launchConfig.getType().getIdentifier();
				launchConfigExists = !launchConfigTypeId.equals(GhidraLaunchUtils.GUI_LAUNCH) &&
					!launchConfigTypeId.equals(GhidraLaunchUtils.HEADLESS_LAUNCH);
			}
		}
		catch (CoreException e) {
			// launchConfigExists can remain false, we'll just overwrite the config
		}

		if (projectName.isEmpty()) {
			message = "Project name must be specified";
		}
		else if ((BAD_START + BAD).chars().anyMatch(ch -> projectName.charAt(0) == ch)) {
			message = "Project name cannot start with an invalid character:\n " + BAD_START + BAD;
		}
		else if (BAD.chars().anyMatch(ch -> projectName.indexOf(ch) != -1)) {
			message = "Project name cannot contain invalid characters:\n " + BAD;
		}
		else if (showProjectDir && projectDir == null) {
			message = "Project root directory must be specified";
		}
		else if (showProjectDir && projectDir.exists()) {
			message = "Project already exists at: " + projectDir.getAbsolutePath();
		}
		else if (ResourcesPlugin.getWorkspace().getRoot().getProject(projectName).exists()) {
			message = "\"" + projectName + "\" project already exists in workspace";
		}
		else if (shouldCreateRunConfig() && launchConfigExists) {
			message = "Run configuration \"" + projectName +
				"\" project already exists (check run configuration filters)";
		}
		else if (createRunConfigCheckboxButton.getSelection() &&
			!runConfigMemoryText.getText().isEmpty() &&
			!Pattern.matches("^\\d+[KkMmGg]$", runConfigMemoryText.getText())) {
			message = "Invalid run configuration memory value.  Value must match JVM -Xmx flag" +
				" syntax (4G, 1500m, etc).";
		}

		setErrorMessage(message);
		setPageComplete(message == null);
		if (message == null) {
			if (projectRootDirText != null) {
				GhidraProjectCreatorPreferences
						.setGhidraLastProjectRootPath(projectRootDirText.getText());
			}
		}
	}
Validates the fields on the page and updates the page's status.
Should be called every time a field on the page changes.
GhidraBuild/EclipsePlugins/GhidraDev/GhidraDevPlugin/src/main/java/ghidradev/ghidraprojectcreator/wizards/pages/CreateGhidraProjectWizardPage.java