Validate correct format for user input.