validation

validation
Type:array
Scope:Proc.

Values for the eval rules. The keys of the array must correspond to the keyword of the related evaluation rule. For maximumRecordsChecked and maximumRecordsCheckedInPid the value is expected to be an integer.

Examples

Only one record can be checked

In the example below, only one record from the same table will be allowed to have that particular box checked.

../../../../_images/Checkbox8.png
'columns' => [
    'checkbox_8' => [
        'exclude' => 1,
        'label' => 'checkbox_8',
        'description' => 'eval=maximumRecordsCheckedInPid, for this PID',
        'config' => [
            'type' => 'check',
            'eval' => 'maximumRecordsCheckedInPid',
            'validation' => [
                'maximumRecordsCheckedInPid' => 1,
            ],
        ],
    ],
]