Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate default message from provided name #46

Open
jtheriault opened this issue Aug 4, 2020 · 3 comments
Open

Generate default message from provided name #46

jtheriault opened this issue Aug 4, 2020 · 3 comments

Comments

@jtheriault
Copy link
Member

As a convenience coerce should generate a default message based on a provided name for the value being coerced.

Example

${name} should be coerceable to ${type.name}. Provided value: ${JSON.stringify(value, null, 2)}
@jtheriault
Copy link
Member Author

This may require a major version to continue allowing a complete message to be provided

@terodox
Copy link
Contributor

terodox commented Aug 18, 2020

After our discussion last week, I made an attempt at having an overloaded method that would accept and object as the first parameter. That was definitely a no go. We cannot be confident that the first parameter is not already an object causing the validation for this to be sketchy at best.

I'm going to make an attempt at the 3rd parameter being an options object, as that was the other alternative we had discussed.

@terodox
Copy link
Contributor

terodox commented Aug 18, 2020

PR amended with third parameter being allowed to be an optional object

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

No branches or pull requests

2 participants