added onlyIf to the registered validators