/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/form/FormErrors.inc
ViewVC logotype

Annotation of /nfo/php/libs/com.newsblob.phphtmllib/form/FormErrors.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations)
Sat Sep 20 00:18:43 2003 UTC (20 years, 11 months ago) by jonen
Branch: MAIN
Changes since 1.1: +2 -1 lines
+ updated whole phphtmllib to v2.3.0

1 jonen 1.1 <?php
2     /**
3     *
4     * This file holds the error codes and error messages
5     * associated with those codes for English
6     *
7 jonen 1.2 * $Id: FormErrors.inc,v 1.3 2003/04/02 21:20:36 hemna Exp $
8 jonen 1.1 *
9     * @author Walter A. Boring IV <waboring@buildabetterweb.com>
10     * @package phpHtmlLib
11     * @subpackage FormProcessing
12     *
13     * @copyright LGPL - See LICENCE
14     */
15    
16     class FormErrors {
17    
18     /**
19     * error array from the FormValidation
20     * class.
21     */
22     var $error_array = array(
23     "ERR_OK" => 0,
24 jonen 1.2 "ERR_EMPTY" => "This field cannot be empty",
25 jonen 1.1
26     "INVALID_IP" => "The IP address you have entered is not in a valid format",
27     "INVALID_LOGIN_NAME_LENGTH" => "The User Name must be less than 40 characters.",
28     "INVALID_LOGIN_NAME_EMPTY" => "The User Name field must not be blank.",
29     "INVALID_LOGIN_NAME_CHARACTERS" => "The User Name field may contain only letters and numbers.",
30     "INVALID_PASSWORD_EMPTY" => "The Password field must not be blank.",
31     "INVALID_PASSWORD_LENGTH" => "The Password field should be less than 40 characters.",
32     "INVALID_PASSWORD_CHARACTERS" => "The Password field contains invalid characters",
33     "PASSWORD_CONFIRM_NO_MATCH" => "The password and confirmation password you have typed do not match. Please try again.",
34    
35     "INVALID_PATH_LENGTH" => "The path field does not meet the requirements. It must be less than 40 characters.",
36     "INVALID_PATH_EMPTY" => "The path field must not be blank.",
37     "INVALID_PATH_CHARACTERS " => "The path field may contain only letters and numbers.",
38    
39     "INVALID_NUMBER" => "This field must contain a valid number.",
40     "INVALID_LENGTH_40" => "This field must not exceed 40 characters in length.",
41     "INVALID_NAME_EMPTY" => "The name must not be empty.",
42     "INVALID_NAME_CHARACTERS" => "The name may contain only letters and numbers.",
43    
44     "EMPTY_FIELD" => "This field can not be empty",
45     "INVALID_DOMAIN_NAME" => "This domain name you have entered is not valid.",
46     "INVALID_HOST_NAME" => "The host name you have entered is not valid.",
47     "INVALID_IP_EMPTY" => "The IP Address must not be empty.",
48     "INVALID_EMAIL_EMPTY" => "The email address can not be empty.",
49     "INVALID_EMAIL" => "The email address is not properly formatted.",
50     "INVALID_LENGTH_256" => "This field must not exceed 256 characters in length.",
51     "INVALID_PHONE" => "The phone number you have entered is not properly formatted.",
52    
53     "ONLY_DIGITS" => "Only numeric digits are allowed in this field.",
54     "INVALID_MONTH" => "You have entered an invalid month.",
55     "INVALID_DAY" => "You have entered an invalid day.",
56     "INVALID_YEAR" => "You have entered an invalid year.",
57     "INVALID_HOUR" => "You have entered an invalid hour.",
58     "INVALID_MINUTES" => "You have entered invalid mintues.",
59     "INVALID_SECONDS" => "You have entered invalid seconds.",
60     "INVALID_LEAP_DAY" => "The year you have entered is not a leap year. February only has 28 days.",
61     "INVALID_30_DAY" => "There are only 30 days in this month.",
62     "INVALID_ZERO_HUNDRED_NUMBER" => "This number must be between 0 and 100.",
63     "INVALID_MONEY" => "This must be a valid amount in Dollars and Cents.",
64     "INVALID_FLOAT" => "This must be a valid floating point number.",
65     "INVALID_EMAIL_MISSING_BRACKETS" => "The long form email address must contain the < > characters, such as \"Foo Bar &lt;foo@bar.com&gt;\".",
66    
67     "INVALID_EMPTY" => "This field cannot be empty.",
68     "INVALID_STATE" => "You must specify a 2 letter state code (ie. 'CA' for California).",
69     "INVALID_ZIP" => "Invalid zip code",
70     "INVALID_FIELD" => "This field's value is invalid.",
71     "INVALID_TIME_FORMAT" => "You have entred an invalid date/time format.",
72     "INVALID_YEAR_DATE_1990_3000" => "The year must be between 1990 and 3000",
73    
74     "INVALID_PRICE" => "Price must be a valid, non-zero amount in dollars and cents.",
75    
76     "CCEXP" => "Credit card expired already",
77     "CCEXP_TOO_FAR" => "Credit card expires in more than 30 years?",
78     "NOT_IN_RANGE" => "Value not in range.",
79     "INVALID_URL" => "URL must be in the form of http[s]://hostip [:port number] [path]",
80     "INVALID_LENGTH" => "Entry has exceeded allowed length.",
81     "INVALID_STANDALONE_HOST_NAME" => "You have entered an invalid host name. Please enter a Hostname without the domainname.",
82    
83     "INVALID_ALPHANUM_CHARACTERS" => "This field may contain only numbers and letters.",
84     "NOT_LEAPYEAR" => "The year is not a leapyear"
85     );
86    
87     /**
88     * This returns the appropriate error message
89     * based on the error #.
90     *
91     * @param string - the error code
92     * @return string - the error string.
93     *
94     */
95     function get_error_msg($err) {
96     return $this->error_array[$err];
97     }
98     }
99     ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed