eval

eval ('type' => 'email')
Path

$GLOBALS['TCA'][$table]['columns'][$field]['config']

type

string (list of keywords)

Scope

Display / Proc.

Configuration of field evaluation.

Some of these evaluation keywords will trigger a JavaScript pre- evaluation in the form. Other evaluations will be performed in the backend. The evaluation functions will be executed in the list-order. Keywords:

unique

Requires the field to be unique for the whole table. Evaluated on the server only.

uniqueInPid
Requires the field to be unique for the current PID among other records on the same page. Evaluated on the server only.

Examples

Trim white space

Require an email address to be unique for this record type in this folder

'aField' => [
   'label' => 'aLabel',
   'config' => [
      'type' => 'email',
      'eval' => 'uniqueInPid',
   ],
],
Copied!