Custom realm attribute validation

Hi!

Is it possible to add custom validation for realm attributes?

For example I’ve added a custom realm attribute by extending realm-detail.html and added a field for an URL. This URL points to an external webservice to be used in multiple authenticators. Now it should be validated that this realm attribute is only empty if these authenticators are not configured.

Is there a way to add this custom validation? Or is there perhaps another way this could be achieved?

Thanks in advance!