Modify the long version of the registration application


Assignment Task: How to use regular expressions, handle exceptions, and validate data.

Exercise - Modify the long version of the Registration application

In this exercise, you can modify and enhance the Registration application.

Open and test the application

1. Run the application that's stored in the ex_starts/ch15_ex1 directory.

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 4111111111111111.

3. Open the index.php, validate.php, and register.php files for this application and review the code. Note that this code works like the short Registration application except that it gets more data from the user.

Modify the code

4. In the phone() and zip() methods of the Validate class, use the \d pattern instead of the [ [:digit:]] pattern.

5. In the password() method of the Validate class, modify the code so the password must be at least 8 characters long with at least one uppercase letter and one number. But don't require a lowercase letter or a special character.

6. Modify the index.php file so the Address, City, State, and Zip fields are optional. To do that, you can pass a third argument to the text method of the Validate class.

7. 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.

8. 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. However, it also gives you less control over the error message that's displayed.

You too might score maximum and outshine among your classmates; you just have to contact with our professional Web Application and Server Management Assignment Help tutors, in order to taste the academic success.

Tags: Web Application and Server Management Assignment Help, Web Application and Server Management Homework Help, Web Application and Server Management Coursework, Web Application and Server Management Solved Assignments

Download:- Web Application-Server Management.rar

Request for Solution File

Ask an Expert for Answer!!
Other Subject: Modify the long version of the registration application
Reference No:- TGS03040424

Expected delivery within 24 Hours