Open and test the application 1. Run the application that’s stored in the ex_starts/ch15_ex1 directory.  This exercise has modified requirements comparing with the exercise demonstrated during the...


Open and test the application

1. Run the application that’s stored in the ex_starts/ch15_ex1 directory.This exercise has modified requirements comparing with the exercise demonstrated during the session!!


2. Test this application by entering valid and invalid data. To test the credit card fields with valid data, you can use a Visa card with a number of XXXXXXXXXX.



Modify the code


3. In the phone() and zip() methods of the Validate class, use the \d pattern instead of the [[:digit:]] pattern. The phone should be displayed in format XXXXXXXXXXThe zip code should be formatted as a Canadian postal code in the format Z9Z 9Z9 (Z for upper case letter and 9 for digit).


4. In the password() method of the Validate class, modify the code so the password must be at least 12 characters long with at least one uppercase letter, one number, one lower case, and one special character.


5. Modify the index.php file so the Address, City, State, and Zip fields are all required.


6. Add a Birth date field after the Phone number field that requires the user to enter a birth date in this format: mm/dd/yyyy. To get this to work properly, add a birthdate() method to the Validate class. This method should make sure that the birth date isn’t a date in the future.


In the email() method of the Validate class, modify the code so it uses the filter_var() function with the INPUT_VALIDATE_EMAIL filter. (Remember that when you use this function, you don’t include an input type like you do when you use the filter_input() function. This makes the code much shorter.




May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here