## Change system code
1. in the `u:OnBeforeItemCreate` event, after `$object` variable was initialized, add these lines:
```
lang=php
$object->SetDBField('FirstName', array(1,2,3));
$object->SetDBField('MaxValueInc0Valid', 0);
$object->SetDBField('MinValueInc0Valid', 0);
$object->SetDBField('MaxValueExc0Valid', -5);
$object->SetDBField('MinValueExc0Valid', 5);
$object->SetDBField('MaxLen2Valid', '1');
$object->SetDBField('MinLen2Valid', '22');
$object->SetDBField('MaxValueInc0InValid', 5);
$object->SetDBField('MinValueInc0InValid', -5);
$object->SetDBField('MaxValueExc0InValid', 0);
$object->SetDBField('MinValueExc0InValid', 0);
$object->SetDBField('MaxLen2InValid', '333');
$object->SetDBField('MinLen2InValid', '1');
```
2. in the `users_config php` remove `type` key from `FirstName` field configuration (to bypass type validation)
3. in the `users_config php` add elements to `VirtualFields` array:
```
lang=php
'MaxValueInc0Valid' => array('type' => 'int', 'max_value_inc' => 0),
'MinValueInc0Valid' => array('type' => 'int', 'min_value_inc' => 0),
'MaxValueExc0Valid' => array('type' => 'int', 'max_value_exc' => 0),
'MinValueExc0Valid' => array('type' => 'int', 'min_value_exc' => 0),
'MaxLen1Valid' => array('type' => 'string', 'max_len' => 1),
'MinLen1Valid' => array('type' => 'string', 'min_len' => 1),
'MaxValueInc0InValid' => array('type' => 'int', 'max_value_inc' => 0),
'MinValueInc0InValid' => array('type' => 'int', 'min_value_inc' => 0),
'MaxValueExc0InValid' => array('type' => 'int', 'max_value_exc' => 0),
'MinValueExc0InValid' => array('type' => 'int', 'min_value_exc' => 0),
'MaxLen2InValid' => array('type' => 'string', 'max_len' => 2),
'MinLen2InValid' => array('type' => 'string', 'min_len' => 2),
```
## Testing
# login to Admin Console
# go to {nav User Management > Users} section
# press `Add` toolbar button
# press `Save` toolbar button
# confirm that `strlen() expects parameter 1 to be string, array given` error or similar is reported in Debugger
# confirm that `Valid` group virtual fields doesn't report any errors in Debugger
# confirm that all six `value_out_of_range` errors from `InValid` group virtual fields report errors in Debugger