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.

form.errors.get / form.errors.has aren't working?

See original GitHub issue

Calling form.errors.all() returns

{ 
  "message": "The given data failed to pass validation.", 
  "errors": { "field1": [ "The field1 may not be greater than 2 characters." ] }
}

But trying to access it via form.errors.get('field1') or form.errors.has('field1') returns nothing. What am I doing wrong?

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
sebastiandedeynecommented, Aug 16, 2017

Reopening this.

Gonna release a v2 of this package around the time of Laravel 5.5 to match the new response format.

1reaction
sebastiandedeynecommented, Aug 18, 2017

This is currently on the master branch and will be part of v2.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring 3 MVC - form:errors not showing the errors
When I debug the method, I can see the BindingResult has errors, but for some reason its not being displayed on the form....
Read more >
6 Form Error Message Mistakes Almost Everyone Makes
Discover the most common mistakes when it comes to creating error messages for your web forms and learn how to correct those errors...
Read more >
Handling Forms - VeeValidate
In case you want to perform some logic after a form fails to submit due to validation errors (e.g: focusing the first invalid...
Read more >
Form Error Messages - Elementor
Learn everything about Form Error Messages in this article from Elementor's Knowledge Base. Get Elementor tips & more.
Read more >
Accessing and Debugging Symfony Form Errors - SymfonyCasts
What do you get? Almost definitely an empty array, even when the form has lots of errors. Yea, I've been there too. 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