public boolean validateStr(String s) {

		char[] tempCharArray = s.toCharArray();
		boolean check = false;
		if (s.equals("")) {
			// if the user does not input anything: return false
			return false;
		} else {
			// for loop cycles through each position of the char array to check
			// if there are any characters
			// returns false if any special character appears
			for (int i = 0; i < tempCharArray.length; i++) {
				if (tempCharArray[i] == ',' || tempCharArray[i] == '%'
						|| tempCharArray[i] == '<' || tempCharArray[i] == '>') {

					// shows the user an error message informing them not to
					// input special characters (especially not the ones listed
					// in the message)
					JOptionPane
							.showMessageDialog(
									new JFrame(),
									"<html>Special characters are not allowed<p>This includes: < ,> ,% , (and no commas)</html>",
									"Special Character Error",
									JOptionPane.ERROR_MESSAGE);

					return false;
				}
				// if checks if there user just held down the space bar
				else if (tempCharArray[i] == ' ' && check == false) {
					check = false;
				}
				// if the character is valid: check becomes true
				else {
					check = true;
				}
			}// end of for loop

			// if check is true: true is returned; string is valid
			if (check) {
				return true;
			}
			// if check is false: false is returned; string is invalid
			else {
				return false;
			}
		}

	}