public void addError ( String field , String error ) { Assert . notNull ( field , "field must not be null" ) ; Assert . notNull ( error , "field must not be null" ) ; addErrors ( field , Collections . singletonList ( error ) ) ; addResultProperty ( SUCCESS_PROPERTY , Boolean . FALSE ) ; }
Adds one error message to a specific field . Does not overwrite already existing errors .