int
Allows to enter number values.
The int type has five optional additional parameters: min, max, skip, regex, error.
min and max
Optional. These two parameters are used to specify minimal and/or maximal allowed value.
skip
Optional. Specifies whether a property value can be empty or not.
Possible values for
skip are:
| Value |
Description |
| 0 |
Do not allow to leave property value empty. |
| 1 |
Property value can be empty. |
|
If skip is omitted 1 is assumed.
regex
Optional. Specifies regular expression for validating the value.
error
Optional. Defines error message text if regular expression failes.
Example
<? $properties = Array( 'age' => Array( 'type' => 'int', 'value' => 30, 'label' => 'Age', 'min' => 15, // minimal allowed value 'max' => 55, // maximal allowed value 'skip' => 0 // property value should not be empty ), 'speed_limit' => Array( 'type' => 'int', 'value' => 0, 'label' => 'Speed limit', 'max' => 90, // maximal allowed value ) ); ?>
|
 |
When editing int property type you can use arithmetic operations or enter value as a hexadecimal numbmer.
|
|