QUESTION 1 You are validating user input by using JavaScript and regular expressions. A group of predefined regular expressions will validate two input fields: – An email address in a function named validateEmail – A nine-digit number that allows optional hyphens after the second and fifth character in a function named validateSSN You need to…