public void validate(ValidationContext valCtx) {
super.validate(valCtx); // Before doing custom validation do basic validation
if(valCtx.isDELETE()) {
AuthRealm ar = (AuthRealm)valCtx.getTargetBean();
SecurityService sec = (SecurityService) ar.parent();
String realmName = ar.getName();
String defaultRealmName = null;
try {
defaultRealmName = sec.getDefaultRealm();
} catch (Exception ee) {