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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Sat Feb 22 21:07:42 2003 UTC (21 years, 4 months ago) by jonen
Branch: MAIN
+ updated whole lib to version 2.2.1 (new FormProcessing since 2.2.0!)

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

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