 |
Order Processor Validation
Front End Validation
The front end validation attempts to facilitate the user into identifying mistakes made when entering data. The front end validation does not take the approach of preventing hackers but rather to help the user identify where incorrect data has been entered. The user will be shown immediately where errors lie before forwarding to any other page or sending information back to Aptimus.
Objectives for Front End Validation:
- Check for required fields.
- Check that at least one offer is selected.
- Check generic field names and values.
Required Fields
As an offer is displayed on the browser each question has been flagged if it is required or not. This information is stored in the database and gets sent to the browser with the offer. When the user submits the data, the javascript function "checkRequiredFields( frm )" iterates through each question and determines if it is required. If it is required, then data must exist for that question.
At least one offer is selected
Nothing will get submitted to the Aptimus servers if the user has unselected the offers that they had originally checked.
Field Names and Values
Email Address
- Email Address must have a known domain. Acceptable domains are: com, net, org, edu, int, mil, gov, arpa, biz, aero, name, coop, info, pro, museum, ca.
- It must conform to data @ data.
- All characters must be in the correct character ascii code domain.
Credit Card
- First we check that only numbers are used.
- We check to make sure the number is at least 14 characters in length.
- We use an algorithm that converts every other character in the credit card number to a different number based on whether it's odd or even and adds all the numbers together, and if the result divided by 10 is not equal to 0, the number is invalid.
- We check to make sure the first number is between 3 and 6.
- If the card type chosen is Mastercard, we check that the first two digits ar between 51 and 55 and that there are 16 digits total.
- If the card type chosen is Visa, we check that the first number is a 4 and that there are 16 digits total.
- If the card type chosen is American Express, we check that the first two numbers are either 34 or 37 and that there are 15 digits total.
- If the card type is DinersClub, we check that the first two characters are either 30, 36, or 38 and that there are 14 digits total.
- If the card type is Discover, we check that the first four numbers are 6011 and that there are 16 digits total.
- If the card type chosen is JCB, we check that the first four numbers are either 3088, 3096, 3112, 3158, 3337 or 3528 and that there are 16 digits total.
- We check to make sure the expiration falls after the current date.
Phone Number
- The Phone Number Field can only be comprised of the following symbols: ().-1234567890.
- There must be either 7 or 10 digits.
Zip Code
- All symbols in the Zip Code must be alphanumeric or be a - or .
For Aptimus Publisher Use Only
©2007 All Rights Reserved
Last Updated
8/23/01
|