Skip to content

Conversation

exeto
Copy link

@exeto exeto commented Oct 20, 2017

When you have an application that is listed lower in the registry than ember-validations/messages, custom messages module will fail

Reproduction steps:

  1. Generate new ember app that starts with a lower alpha character - i.e ember new zebra-app
  2. Install ember-validations
  3. Install all dependencies needed for ember-changeset-validations
  4. Provide a custom messages module i.e. - zebra-app/app/validations/messages
  5. Try to use validations, and you will see that custom messages does not get used

Description taken from #144

@exeto
Copy link
Author

exeto commented Dec 19, 2017

@poteto Hi. This project is not supported?

@nucleartide
Copy link
Contributor

@exeto Could you explain what this accomplishes? Sorry – I haven't looked through what this code does.

@exeto
Copy link
Author

exeto commented Dec 19, 2017

@nucleartide I updated the message.

@nucleartide
Copy link
Contributor

@exeto Ahh, I see what you mean. The regex will match ember-validations/messages before it matches zebra-app/validations/messages.

I think a more robust solution would be to match on the app name directly. Would you mind modifying the regex to include modulePrefix or APP.name from config/environment? This StackOverflow answer has some approaches to getting the ENV.

@exeto
Copy link
Author

exeto commented Dec 19, 2017

@nucleartide Done

@nucleartide
Copy link
Contributor

@exeto Excellent work, thanks!

@nucleartide nucleartide merged commit 1f53e0b into adopted-ember-addons:master Dec 19, 2017
@exeto
Copy link
Author

exeto commented Dec 19, 2017

@nucleartide thanks

pedrovereza pushed a commit to alphasights/ember-changeset-validations that referenced this pull request Apr 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants