Is there a better way to do this? `$name` is for example `Nette\Forms\Controls\SelectBox::VALID`.