Write a validator for empty fields

Hi,
i tried to develop a validator, that only requires a field if another one holds a specific value.
But Keycloak does not check empty fields.
Has anyone an idea how to make this work or another aproach?

Thanks for any help

Ok, i totaly ovelooked the skipValidation Method. It works not