question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi there! First of all, I would like to thank you guys for this incredible library - it really makes validation very easy.

Second, I would like to ask whether it’s possible to show message in more dynamic fashion?

The reason why I need is that I’m doing a uniqueness check making a backend call which returns a result with some data that should be used in error message. I know that yup allows you to define params that can be used in messages but it’s more static approach. It would be really cool if we could provide a function as a message that would receive these params, validation results and a value in order to generate a desired error message.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
jquensecommented, Sep 17, 2018

@ziflex no need to to be taht fancy. this.createError is provided in on the function context for customizing the rendered message, you can override or extend any of the values and return the error in the test.

https://github.com/jquense/yup/blob/master/src/util/createValidation.js#L31

1reaction
jquensecommented, Sep 10, 2018

It would be really cool if we could provide a function as a message that would receive these params

you can do that 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamic Messaging for eCommerce: Getting Started and ...
In other words, Dynamic Messages act as triggers that drive purchase behavior with visual cues that give customers more information about ...
Read more >
The impact and importance of dynamic messaging - SMSGlobal
Dynamic SMS messaging allows you to send each customer personalised content with different images or links based on their expressed preferences ...
Read more >
7 Dynamic Messages that Leverage Consumer Psychology for ...
Dynamic messages are “dynamic” because they auto-optimize based on the data of the customer. In other words, they use AI to test messages...
Read more >
Dynamic Messaging for DNA - Fiserv
Expand relationships while enhancing service by using Dynamic Messaging for DNA from Fiserv to deliver real-time messages to your front-line staff.
Read more >
Dynamic Messages - Gupshup
Dynamic messages are messages whose contents can be changed programmatically. The bot messages in the scripting tool are really templates. You can create ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found