Coder Social home page Coder Social logo

Comments (5)

ivanvermeyen avatar ivanvermeyen commented on August 22, 2024

Hi,

I see your point :)
This behavior was actually a request some time ago (#1).
But there may well be a decent solution to handle both use cases.
I'll have to dig back in and think about how to do this though.

from laravel-unique-translation.

Xinecraft avatar Xinecraft commented on August 22, 2024

If we use something like https://formvuelar.netlify.com/ this bug will get annoying and hard to fix I think from the frontend side.

from laravel-unique-translation.

ivanvermeyen avatar ivanvermeyen commented on August 22, 2024

Hello,

I agree that always returning both single and array error messages is not optimal after all and it's also not how Laravel handles form errors by default.

I will revert back to only returning relevant messages and try to work out some option to change the behavior for use cases as described in #1 by @ctf0) .

This will need to be a new major version, since it might have an impact on existing implementations.

from laravel-unique-translation.

ivanvermeyen avatar ivanvermeyen commented on August 22, 2024

I pushed an update to dev-master that uses Laravel's default behavior.
Only one error will be returned per form attribute:

Form Field Validation Rule Error Key
slug 'slug' => 'unique_translation:table,column' slug
slug[en] 'slug.*' => 'unique_translation:table,column' slug.en

If you could try or review it, I will tag a new release and then see if I can add some options for extra error messages... 👌

from laravel-unique-translation.

ivanvermeyen avatar ivanvermeyen commented on August 22, 2024

Tagged in 3.0.0 👍

from laravel-unique-translation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.