public boolean removeValidationConstraint ( String type , String field , String constraintName ) { if ( ! StringUtils . isBlank ( type ) && ! StringUtils . isBlank ( field ) && constraintName != null ) { Map < String , Map < String , Map < String , ? > > > fieldsMap = getValidationConstraints ( ) . get ( type ) ; if ( fieldsMap != null && fieldsMap . containsKey ( field ) ) { if ( fieldsMap . get ( field ) . containsKey ( constraintName ) ) { fieldsMap . get ( field ) . remove ( constraintName ) ; } if ( fieldsMap . get ( field ) . isEmpty ( ) ) { getValidationConstraints ( ) . get ( type ) . remove ( field ) ; } if ( getValidationConstraints ( ) . get ( type ) . isEmpty ( ) ) { getValidationConstraints ( ) . remove ( type ) ; } return true ; } } return false ; }
Removes a constraint from the map .