How to disable strict validation of form inputs in Nette

// unset bad options
foreach ($form->getComponents() as $component) {
	if ($component instanceof \Nette\Forms\Controls\CheckboxList) {
		$options = $component->getItems();
		foreach ($defaults[$component->name] as $key => $value) {
			if (!array_key_exists($value, $options)) {
				unset($defaults[$component->name][$key]);
				if (!empty($value)) {
					Tracy\Debugger::log("Value {$value} for codebook {$component->name} doesn't exists.", Tracy\ILogger::WARNING);
				}
			}
		}
	}

	if (
		$component instanceof \Nette\Forms\Controls\SelectBox ||
		$component instanceof \Nette\Forms\Controls\RadioList
	) {
		$options = $component->getItems();
		if (!empty($defaults[$component->name])) {
			if (!array_key_exists($defaults[$component->name], $options)) {
				if (!empty($defaults[$component->name])) {
					Tracy\Debugger::log("Value {$defaults[$component->name]} for select/radio {$component->name} doesn't exists.", Tracy\ILogger::WARNING);
				}
				$defaults[$component->name] = NULL;
			}
		}
	}
}

$form->setDefaults($defaults);