Announcement Announcement Module
Collapse
No announcement yet.
"addError(ObjectError error)" vs "rejectValue(String field, String errorCode)" Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • "addError(ObjectError error)" vs "rejectValue(String field, String errorCode)"

    Hello,

    I am trying to understand the difference between
    1. void addError(ObjectError error) (from org.springframework.validation.Errors)
    2. void rejectValue(String field, errorCode) (from org.springframework.validation.BindingResult)

    I did read the javadocs but could not understand the difference between the two.

    Can anyone please provide an explanation or an code sample?

    Regards,

    J.
Working...
X