wholesale jewelry supplier los angeles
2 thoughts on “wholesale jewelry supplier los angeles In the ThinkPHP framework, Array (Title, 1,1280, beyond the range!, Length) 1280 in the length of the length of the length unit.”
Leave a Comment
You must be logged in to post a comment.
wholesale jewelry in sussex co Some Chinese are composed of two characters, but only one.
array (verification fields, verification rules, error prompts, [verification conditions, additional rules, verification time])
1. Verification field
It must be a database field, or some auxiliary fields of the form, such as confirming the password and verification code. With individual verification rules and fields, the verification fields can be set at will. For example, the Expire valid period rules are not related to the table field.
2. Verification rules
The rules to be verified, combined with additional rules. If you use regular verification additional rules, the system also has some commonly used regular verification rules, which can be directly. Use as verification rules, including: Require field must, email mailbox, url url address, Currency currency, Number number.
3. Error prompt
It to verify the prompt information definition after failed
4. Verification condition
: Exist_validate or 0 existence fields to verify (default)
model :: must_validate or 1 must be verified
model :: value_validate or 2 values to verify
5. R n The use of verification rules, including the following rules:
Regex regular verification, defined verification rules are a regular expression (default)
Function function verification. The defined verification rule is a function name
CALLBACK method verification. The defined verification rules are a method of the current model class
Confirm verification whether the two fields in the form of the form are the same. Definition of the previous verification rules
in verification is within a certain range. The defined verification rules must be an array
length verification length, and the defined verification rules may be a number (indicating a fixed length) or the number range ( For example, 3,12 represents the range from 3 to 12)
between verification range, defined verification rules indicate the range, and you can use string or array, such as 1,31 or Array (1,31)
expire verification verification verification Whether the definition of verification rules indicate the time range, it can be time to time. For example, it can be used to use 2012-1-15,2013-1-15 to indicate that the current submission period is between 2012-1-15 and 2013-11, and also You can use the timestamp definition
ip_allow to verify whether the IP allows IP. The defined verification rules indicate the allowable IP address list, such as 201.12.2.5,201.12.2.6
ip_deny verification whether the IP is prohibited and defined verification rules. The prohibited IP address list is separated by commas. For example, 201.12.2.5,201.12.2.6
unique verification is unique, the system will check the same value according to the current value of the field.
6. Verification time
model :: Model_insert or 1 new data verification
model :: Model_update or 2 Edit Data Verification
model :: Model_both or 3 under all cases under all cases under all cases. Verification (default)
Example
Protected $ _Validate = Array (
array (VERIFY, Require, verification code must!), // Use regular regular verification to verify the verification
array (name, the account name has already existed!, 0, unique, 1), // Verify whether the name field is unique at the time of newly added
array (value, array (1,2,3), value The range is incorrect!, 2, in), // When the value is not empty, determine whether it is within a range
array (, password, confirm the password incorrect, 0, confirm), // Verify whether the confirmation password is Consistent with the password
array (password, checkpwd, incorrect password format, 0, function), // Custom functional verification password format
);
$ user = d ("user"); // instantiated user object
if (! $ user-> create ()) {
//没有通过输出错误提示信息rnexit($User->getError());rn}else{rn// 验证通过可以进行其他数据操作rn}rn
project instance
// Automatic verification
protected $ _Validate = Array (
array (name, request, the name cannot be empty! 1, 3),
array (Tel, Require, mobile phone number cannot be empty! 1, 3),
array (password, request, password cannot be empty! 1, 1),
array (email, requiss, mailbox Can't be empty!, 1,, 3),
array (ID_number, request, ID number cannot be empty! 1, 3),
array !, 1,, 1),
array (ID _OPPOSITE, Require, the reverse photo of the ID card cannot be empty! , 1,, 1),
array (ID_handle, requir, handheld ID photo cannot be empty! 1, 1),
array (bankcard, request, bank card photo cannot be empty! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, , 1),
array (OpenBank, Require, the account opening cannot be empty! 1, 3),
array (, requis, bank account name cannot be empty! 1, 3),
array (, Require, the bank account number cannot be empty!, 1, 3),
array (tel, /^d {11} $ /, the mobile phone number is illegal!, 1, regex, 3),
array (email, email, mailbox illegal!, 1, 3),
array (id_number, /^(d {15} $ | d {18} $ | d {17} (d | X | x)) $/, the ID number is illegal!, 1, regex, 3),
array (Tel, mobile phone number already exists!, 1, unique, 3), // New modification verification Whether the Tel field is unique
array (email,, the mailbox already exists! 1, Unique, 3), // Email's only
array (ID_number, ID number already exists! 1, unique, 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3), 3). // The only
) of the ID number;
In the description, as long as the Model is defined, the call will be called anywhere. very convenient.
must be D method to be effective. The M method does not trigger automatic verification.
wholesale trendy urban fashion jewelry The length is the same effect as the PHP function Strlen.