General characteristics
All data types are inherited from the main type represented by "Model_Element" class (located in "core/datatypes/base.type.php" file) and have the following additional parameters:
"required"
Purpose: makes the field mandatory for filling when create or edit a record
Possible values: "true", "false"
By default: "false"
"unique"
Purpose: allows to support unique values of this field in the SQL table
Possible values: "true", "false"
By default: "false"
"must_match"
Purpose: it is used in web forms on frontend in order that value to be matched with the value of another field (often is used for passwords)
Possible values: field name from this model or form, for example "name", "password"
By default: not set
"help_text"
Purpose: the text with explanations for this field in admin interface (it can also be used on the website forms or templates)
Possible values: text string
By default: not set
"html_params"
Purpose: additional html parameters for this field in admin interface (a CSS class, sizes, and so on)
Possible values: text, html attributes
By default: not set
For all types except "bool", "many_to_many", "many_to_one", "enum", "parent" next parameters of the minimum and maximum length are valid.
"length"
Purpose: the exact required field length (in utf-8 symbols)
Possible values: positive integer
By default: not set
"min_length"
Purpose: the minimum length of a field (in utf-8 symbols)
Possible values: positive integer
By default: not set
"max_length"
Purpose: the maximum length of a field (in utf-8 symbols)
Possible values: positive integer
By default: not set
"min_max_length"
Purpose: the minimum and maximum length of a field (in utf-8 symbols)
Possible values: string value in a form of 2 positive integers separated by a comma ","
By default: not set
Samples
array("Name", "char", "name", array("required" => true)) array("File", "file", "file_price", array("help_text" => "File to download in .pdf")) array("Link", "url", "link", array("required" => true, "unique" => true)) array("Text", "text", "content", array("html_params" => 'class="wide" id="main-content"')) array("Repeat password", "password", "repeat-password", array("required" => true, "must_match" => "new-password"))