src/Configurations.js
// When the input fields change, if the value is invalid, show error message

When the input fields change, if the value is invalid, show error message
When the input fields change if the value is invalid show error message
handleChange(event) {
		this.setState({setUpMaze: false});
		if (event.target.name === "rows") {
			if (event.target.value === "" || event.target.value < 5 || event.target.value > 15) {
				this.setState({rows: null});
				this.setState({rowErrorMessage: "Invalid row value!"});
				return;
			}
			else {
				this.setState({rowErrorMessage: ""});
			}
		}
		if (event.target.name === "columns") {
			if (event.target.value === "" || event.target.value < 5 || event.target.value > 15) {
				this.setState({columns: null});
				this.setState({columnErrorMessage: "Invalid column value!"});
				return;
			}
			else {
				this.setState({columnErrorMessage: ""});
			}
		}
		this.setState({
			[event.target.name]: event.target.value
		});
	}
handleChange ( event ) { this . setState ( { setUpMaze : false } ) ; if ( event . target . name === "rows" ) { if ( event . target . value === "" || event . target . value < 5 || event . target . value > 15 ) { this . setState ( { rows : null } ) ; this . setState ( { rowErrorMessage : "Invalid row value!" } ) ; return ; } else { this . setState ( { rowErrorMessage : "" } ) ; } } if ( event . target . name === "columns" ) { if ( event . target . value === "" || event . target . value < 5 || event . target . value > 15 ) { this . setState ( { columns : null } ) ; this . setState ( { columnErrorMessage : "Invalid column value!" } ) ; return ; } else { this . setState ( { columnErrorMessage : "" } ) ; } } this . setState ( { [ event . target . name ] : event . target . value } ) ; }
When the input fields change, if the value is invalid, show error message
When the input fields change if the value is invalid show error message
// Remove the grid if user decides to change the grid layout again
 // Check that row values are valid
 // Check that column values are valid
 // Set the rows, columns, and algorithm values for the Maze class to use
