/[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.4 - (hide annotations)
Thu Aug 11 14:09:26 2005 UTC (18 years, 11 months ago) by jonen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +2 -2 lines
+ updated to version 2.5.3

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.4 * $Id: FormErrors.inc,v 1.6.2.1 2005/05/12 01:24:02 hemna Exp $
8 jonen 1.1 *
9 jonen 1.4 * @author Walter A. Boring IV <waboring@newsblob.com>
10 jonen 1.1 * @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 jonen 1.3 "INVALID_LENGTH" => "Entry has exceeded allowed length.",
41     "INVALID_LENGTH_N" => "This field must not exceed XX_MAX characters in length. The character count is XX_LENGTH",
42 jonen 1.1 "INVALID_LENGTH_40" => "This field must not exceed 40 characters in length.",
43 jonen 1.3 "INVALID_LENGTH_256" => "This field must not exceed 256 characters in length.",
44 jonen 1.1 "INVALID_NAME_EMPTY" => "The name must not be empty.",
45     "INVALID_NAME_CHARACTERS" => "The name may contain only letters and numbers.",
46    
47     "EMPTY_FIELD" => "This field can not be empty",
48     "INVALID_DOMAIN_NAME" => "This domain name you have entered is not valid.",
49     "INVALID_HOST_NAME" => "The host name you have entered is not valid.",
50     "INVALID_IP_EMPTY" => "The IP Address must not be empty.",
51     "INVALID_EMAIL_EMPTY" => "The email address can not be empty.",
52 jonen 1.3 "INVALID_EMAIL" => "The email address is not properly formatted.",
53 jonen 1.1 "INVALID_PHONE" => "The phone number you have entered is not properly formatted.",
54    
55     "ONLY_DIGITS" => "Only numeric digits are allowed in this field.",
56     "INVALID_MONTH" => "You have entered an invalid month.",
57     "INVALID_DAY" => "You have entered an invalid day.",
58     "INVALID_YEAR" => "You have entered an invalid year.",
59     "INVALID_HOUR" => "You have entered an invalid hour.",
60     "INVALID_MINUTES" => "You have entered invalid mintues.",
61     "INVALID_SECONDS" => "You have entered invalid seconds.",
62     "INVALID_LEAP_DAY" => "The year you have entered is not a leap year. February only has 28 days.",
63     "INVALID_30_DAY" => "There are only 30 days in this month.",
64     "INVALID_ZERO_HUNDRED_NUMBER" => "This number must be between 0 and 100.",
65 jonen 1.3 "INVALID_MONEY" => "This must be a valid amount in dollars and cents.",
66 jonen 1.1 "INVALID_FLOAT" => "This must be a valid floating point number.",
67     "INVALID_EMAIL_MISSING_BRACKETS" => "The long form email address must contain the < > characters, such as \"Foo Bar &lt;foo@bar.com&gt;\".",
68    
69     "INVALID_EMPTY" => "This field cannot be empty.",
70     "INVALID_STATE" => "You must specify a 2 letter state code (ie. 'CA' for California).",
71     "INVALID_ZIP" => "Invalid zip code",
72     "INVALID_FIELD" => "This field's value is invalid.",
73     "INVALID_TIME_FORMAT" => "You have entred an invalid date/time format.",
74     "INVALID_YEAR_DATE_1990_3000" => "The year must be between 1990 and 3000",
75    
76     "INVALID_PRICE" => "Price must be a valid, non-zero amount in dollars and cents.",
77    
78     "CCEXP" => "Credit card expired already",
79     "CCEXP_TOO_FAR" => "Credit card expires in more than 30 years?",
80     "NOT_IN_RANGE" => "Value not in range.",
81 jonen 1.3 "INVALID_URL" => "URL must be in the form of http[s]://hostip [:port number] [path]",
82 jonen 1.1 "INVALID_STANDALONE_HOST_NAME" => "You have entered an invalid host name. Please enter a Hostname without the domainname.",
83    
84     "INVALID_ALPHANUM_CHARACTERS" => "This field may contain only numbers and letters.",
85     "NOT_LEAPYEAR" => "The year is not a leapyear"
86     );
87    
88     /**
89     * This returns the appropriate error message
90     * based on the error #.
91     *
92     * @param string - the error code
93     * @return string - the error string.
94     *
95     */
96     function get_error_msg($err) {
97     return $this->error_array[$err];
98     }
99     }
100     ?>

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