uniquewith-validator icon indicating copy to clipboard operation
uniquewith-validator copied to clipboard

It only works for the current request

Open waltermaldonado opened this issue 6 years ago • 4 comments

I am not sure if this is a bug or I missed something. I have a unique validation in a field named 'code' together with a field named 'team_id'. The thing is: when I save the record, I only send in the request the code field, and it is failing validation, saying there is a field with this value already. How can I overcome this?

Thanks in advance.

waltermaldonado avatar Feb 18 '19 02:02 waltermaldonado

Yes, looks like the code parameters in the validator only accept first 2 params. Not sure it's bug of laravel?

robinhoo1973 avatar Mar 12 '19 23:03 robinhoo1973

Yes, looks like the code parameters in the validator only accept first 2 params. Not sure it's bug of laravel?

I don't think so, since laravel does not have a unique_with validator (see https://laravel.com/docs/5.8/validation#available-validation-rules)

waltermaldonado avatar Mar 12 '19 23:03 waltermaldonado

Yes, you’re right, I just found it’s another issue caused

waltermaldonado [email protected]于2019年3月13日 周三上午7:36写道:

Yes, looks like the code parameters in the validator only accept first 2 params. Not sure it's bug of laravel?

I don't think so, since laravel does not have a unique_with validator (see https://laravel.com/docs/5.8/validation#available-validation-rules)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/felixkiss/uniquewith-validator/issues/103#issuecomment-472221788, or mute the thread https://github.com/notifications/unsubscribe-auth/AGNZmySl1jMxGKR97RAsZ1zm6zX1kVNgks5vWDn7gaJpZM4a__zO .

robinhoo1973 avatar Mar 12 '19 23:03 robinhoo1973

@waltermaldonado hey, how you overcome that, I am facing this issue now.

hellohasan avatar Feb 18 '21 10:02 hellohasan