As of today, the generic install-config code from the installer loads the YAML and immediately validates it.
For the agent use case, it is better that the code is broken into two separate functionalities i.e.
1. Just load the default install config and perform the basic YAML file validations
2. The next step which will be called after step 1 above, is to perform all the data validations for the install-config.yaml
More detailed info is in this slack thread https://coreos.slack.com/archives/C02TGJZHW81/p1669138150713519?thread_ts=1669130153.003739&cid=C02TGJZHW81