validation for inputs added
added error message for incorrect submissions
fixed issue with validation