You can change this to 
```php
$rules[]="array('".implode(', ',$booleanRequired)."', 'required', 'trim'=>false)"; 
```