Use the _validator_ config function for non-trivial validation.

The function receives a reference to the field.
Return `true` for a valid field, or an error string for an invalid field.


The function can be in-line, or a string which names a controller method.

    {
        module: Text,
        labelText: 'Name',
        validator: field => field.value.match(/^\w+$/)?true:'Special characters are not allowed',
    }, 


    {
        module: Text,
        labelText: 'Name',
        validator: 'nameValidator'
    }, 