private function buildIsReq($strJs, $trigField)
    {
        $trigName = $trigField->attribs['name'];
        $strJs = \str_replace('{{'.$trigName.'}}', 'val', $strJs);
        $strJs = \preg_replace_callback($this->regExOther, array($this, 'replaceOther'), $strJs);
        $strJs = \preg_replace_callback($this->regExThis, array($this, 'replaceCurrent'), $strJs);
        $strJs = \preg_replace(
            '#in_array\('
                .'(.*?),\s*array\((.*?)\)'
                .'\)#',
            'BDKForm.inArray($1, [$2])',
            $strJs
        );
        $strJs = \str_replace('is_numeric', 'parseFloat', $strJs);
        if ($trigField->returnArray) {
            // not checking for a specific value...
            $strJs = \preg_replace('/(^|[\s!])val(\s|$)/', '$1val.length$2', $strJs);
        }
        return $strJs;
    }