Realm in validation sub