Test Schema

Configuration Documentation

Table of Contents

Types

string: String

istring: Case-insensitive string

A series of case-insensitive characters. Internally, upper-case ASCII characters will be converted to lower-case.

text: Text

A series of characters that may contain newlines. Text tends to indicate human-oriented text, as opposed to a machine format.

itext: Case-insensitive text

A series of case-insensitive characters that may contain newlines.

int: Integer

An integer. You are alternatively permitted to pass a string of digits instead, which will be cast to an integer using (int).

float: Float

A floating point number. You are alternatively permitted to pass a numeric string (as defined by is_numeric()), which will be cast to a float using (float).

bool: Boolean

A boolean. You are alternatively permitted to pass an integer 0 or 1 (other integers are not permitted) or a string "on", "true" or "1" for true, and "off", "false" or "0" for false.

lookup: Lookup array

An array whose values are true, e.g. array('key' => true, 'key2' => true). You are alternatively permitted to pass an array list of the keys array('key', 'key2') or a comma-separated string of keys "key, key2". If you pass an array list of values, ensure that your values are strictly numerically indexed: array('key1', 2 => 'key2') will not do what you expect and emits a warning.

list: Array list

An array which has consecutive integer indexes, e.g. array('val1', 'val2'). You are alternatively permitted to pass a comma-separated string of keys "val1, val2". If your array is not in this form, array_values is run on the array and a warning is emitted.

hash: Associative array

An array which is a mapping of keys to values, e.g. array('key1' => 'val1', 'key2' => 'val2'). You are alternatively permitted to pass a comma-separated string of key-colon-value strings, e.g. "key1: val1, key2: val2".

mixed: Mixed

An arbitrary PHP value of any type.

Directive

Directive.Allowed

Type String
Allowed values "apple", "orange", "pear", "peach", "mango"
Default
'apple'
This directive has a constrained set of allowed values.

Directive.Deprecated

Type Integer
Default
0
Warning: This directive was deprecated in version 1.0.0. %Directive.Allowed should be used instead.
This is a deprecated directive that shouldn't show up on the form.

Type

Type.bool

Type Boolean
Default
false
The boolean type is true or false.

Type.float

Type Float
Default
3.1415
The float type is a floating point number.

Type.hash

Type Associative array
Default
array (
  'key1' => 'val1',
  'key2' => 'val2',
)
The hash type is an associative array of string keys and string values.

Type.int

Type Integer
Default
23
The int type is an signed integer.

Type.istring

Type Case-insensitive string
Default
'case insensitive'
The istring type is short (no newlines), must be ASCII and is case-insensitive.

Type.itext

Type Case-insensitive text
Default
'case
insensitive
and
possibly
quite
long'
The text type has newlines, must be ASCII and is case-insensitive.

Type.list

Type Array list
Default
array (
  0 => 'item1',
  1 => 'item2',
)
The list type is a numerically indexed array of strings.

Type.lookup

Type Lookup array
Default
array (
  'key1' => true,
  'key2' => true,
)
The lookup type acts just like list, except its elements are unique and are checked with isset($var[$key]).

Type.mixed

Type Mixed
Default
(object) array(
)
The mixed type allows any type, and is not form-editable.

Type.nullbool

Type Boolean (or null)
Default
NULL
Null booleans need to be treated a little specially. See %Type.nullstring for information on what the null flag does.

Type.nullstring

Type String (or null)
Default
NULL
The null type is not a type, but a flag that can be added to any type making null a valid value for that entry. It's useful for saying, "Let the software pick the value for me," or "Don't use this element" when false has a special meaning.

Type.string

Type String
Default
'Case sensitive'
The string type is short (no newlines) and case-sensitive.

Type.text

Type Text
Default
'Case sensitive
and
possibly
quite long...'
The text type has newlines and is case-sensitive.