Announcement Announcement Module
No announcement yet.
Errors.rejectValue requiring a defaultMessage Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Errors.rejectValue requiring a defaultMessage

    It seems strange to me that all Errors.rejectValue methods which allow you to specify an array of parameters to your message phrase require a defaultMessage. For us, and I would assume for most situations, defaultMessage is meaningless as the default locale contains the fallback message phrases. And so we just pass "" for its value... and being a clean code perfectionist, that's just ugly!

    Is there a reason there aren't rejectValue or even reject methods which don't require a defaultMessage (and allow you to pass in an array of parameters)?