| rules |
parameter |
Description |
Example |
| required
|
No |
If the element is empty, it returns FALSE |
|
| matches
|
Yes |
if the form element's value with the corresponding form field parameter values are not equal, then return
FALSE |
matches [form_item] |
| is_unique
|
Yes |
if the form element's value with the specified field in a table have duplicate data, it returns False( Translator's
Note: For example is_unique [User.Email], then the validation class will look for the User table in the
Email field there is no form elements with the same value, such as deposit repeat, it returns false, so
developers do not have to write another Callback verification code.) |
is_unique [table.field] |
| min_length
|
Yes |
form element values if the character length is less than the number defined parameters, it returns FALSE |
min_length [6] |
| max_length
|
Yes |
if the form element's value is greater than the length of the character defined numeric argument, it returns
FALSE |
max_length [12] |
| exact_length
|
Yes |
if the form element values and parameters defined character length number does not match, it returns FALSE |
exact_length [8] |
| greater_than
|
Yes |
If the form element values non- numeric types, or less than the value defined parameters, it returns FALSE |
greater_than [8] |
| less_than
|
Yes |
If the form element values non- numeric types, or greater than the value defined parameters, it returns FALSE |
less_than [8] |
| alpha
|
No |
If the form element value contains characters other than letters besides, it returns FALSE |
|
| alpha_numeric
|
No |
If the form element values contained in addition to letters and other characters other than numbers, it returns
FALSE |
|
| alpha_dash
|
No |
If the form element value contains in addition to the letter/ number/ underline/ characters other than dash,
returns FALSE |
|
| numeric
|
No |
If the form element value contains characters other than numbers in addition, it returns FALSE |
|
| integer
|
No |
except if the form element contains characters other than an integer, it returns FALSE |
|
| decimal
|
Yes |
If the form element type( non- decimal ) is not complete, it returns FALSE |
|
| is_natural
|
No |
value if the form element contains a number of other unnatural values ( other values excluding zero ), it
returns FALSE. Natural numbers like this: 0,1,2,3.... and so on. |
|
| is_natural_no_zero
|
No |
value if the form element contains a number of other unnatural values ( other values including zero ), it
returns FALSE. Nonzero natural numbers: 1,2,3..... and so on. |
|
| valid_email
|
No |
If the form element value contains invalid email address, it returns FALSE |
|
| valid_emails
|
No |
form element values if any one value contains invalid email address( addresses separated by commas in English
), it returns FALSE. |
|
| valid_ip
|
No |
if the form element's value is not a valid IP address, it returns FALSE. |
|
| valid_base64
|
No |
if the form element's value contains the base64-encoded characters in addition to other than the characters,
returns FALSE. |
|