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.

v5.1.0 raises validation errors to every other field

See original GitHub issue

I have a schema with lots of fields and one of them is unique.

When you update values and then save(), if there’s a duplication of that unique field, its validation error is raised fine, but every other field gets a validation error too.

This was introduced in v5.1.0. I think there’s only tests involving simple schemas containing just unique fields. LoL

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
matteodelabrecommented, Sep 15, 2016

Looks like a different issue. Could you create a new one with precise information about your expectations and how the library fails? Thanks! 😃

0reactions
DanielRamosAcostacommented, Sep 14, 2016

Yes, now works for me, but I’m not getting the custom message defined in:

[...]
    index: {
      unique: 'That email already exists!'
    }
[...]

The error message I’m getting is Validator failed for path emailwith valuesomeone@something.com``

Do I create a new issue for this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

RFC: Don't pass a status_code as kwargs in a Field validator ...
The issue with this is the case of several fields raising with a different status code. The last one to deserialize has priority....
Read more >
Submission Validation Service for single project and multi ...
As an example, validation 018.3.2 agency Provide error if this value for any budget year is > 50K for R03 or budget year...
Read more >
Active Record Validations - Ruby on Rails Guides
After Active Record has performed validations, any errors found can be accessed through the errors instance method, which returns a collection of errors....
Read more >
Displaying only one error message per field - Stack Overflow
Works like a charm in my current Rails Project. The advantageous is, i've put the validator only on a few fields not all....
Read more >
ASP.NET Core Blazor forms and input components
Validation is requested on the EditContext when the OnValidationRequested event is raised. All of the errors are cleared. A field changes in the ......
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