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.

Add automatic error rendering

See original GitHub issue

Versions:

  • VueJs: #.#.#
  • Vee-Validate: #.#.#

Description:

Add automatic rendering of errors, and an optional attribute to disable that. For example writing

<span
                                    class="text-danger"
                                    v-show="errors.has('timerecord.id_projects')">
                                        {{ errors.first('timerecord.id_projects') }}
                                </span>

is quite tedious, it would be awesome if this would be automated. Then an input where custom error showing is needed can have a flag like data-custom-error=“true” which would make the developer show the error how he wants to.

Steps To Reproduce:

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
logaretmcommented, Mar 6, 2018

I have implemented a small draft for the error display component which is a functional component similair to router-link and transition, I will work on finalizing its API and maybe add in more features. The current usage looks like this:

import { ErrorComponent } from 'vee-validate';

Vue.component('vv-error', ErrorComponent);
<input name="field" type="text" v-validate="'required'">
<vv-error for="field"></vv-error>
0reactions
logaretmcommented, Mar 6, 2018

Well I though I could address #1191 since I have more control over the displaying behavior, plus we get the richer API of custom components over directives, for example slots, more declarative, custom templates, easier reactivity setup, etc…

So far I haven’t decided on the features to include in the next release but these are the ones I have thought about:

  • Caching messages for better performance.
  • Custom template (default is a span tag).
  • Multiple Error display (default is single).

feel free to suggest more since a lot can be done with a component.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Error compiling movie" during render or export in Adobe ...
Follow this guide to find solutions to the compiling error when rendering or exporting from Adobe Premiere Elements.
Read more >
How To Fix Adobe Premiere Render and Export Errors (2022)
In this Adobe Premiere tutorial, I show you how to fix common render and export errors ! Comment below with which fix worked...
Read more >
Custom error rendering in Slim 4 - Rob Allen's DevNotes
To write a new error renderer, we need to create a classs that implements SLim\Interfaces\ErrorRendererInterface. This interface requires a ...
Read more >
Solved: what does error rendering macro 'awp-include' mean...
It means what it says, it's tried to do what the macro is telling it to do, and it can't render the result...
Read more >
Error rendering input when editing a Component Definition
cs where <ComponentName> is the formatted name given to your Component Definition asset. The reason for the "Error rendering input.." error is because...
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