KennedyTedesco/Validation

Extended validation triggered as fail even returning true

rained23 opened this issue · 5 comments

Hi,

I have some of my validation that use Validator::extend().
I debugged the extended Validator and resulted it return true as it pass the validation.
But using this package, it triggered ->passes() as fail and return message shown my extended validator
message.

I suspect its happen because some conflict with the package.
When I change back the ValidationServiceProvider back to Laravel, the validation pass.

Using Laravel Validation ServiceProvider
image

Using this package Validation ServiceProvider
image

This issue only occurred after composer update, so I tried to debug more and the working version for this package is on 3920432 commit.

Tracing back what was added there, its a PR merged with fix for missing return for parent::_call() .

So I try to add it to the vendor source code, and its fixed

image

Somehow this has been an issue and already fixed by @rudi-vd-merwe at #5 .
I hope @KennedyTedesco can help with fix. I wish I can make a PR, but I have no knowledge on that yet.

Just some curiosity, because I am on L4 , so the branch I use in composer is ~1.0 as stated in README. But 3920432 commit tagged as v2.0 . Is that mean using v1 made us lose many bug fix ?

Regards,
Rain

Hello, @rained23!

Yes, i believe this PR #5 can solve your problem.

I'll create (tomorrow) a new branch for L4 bug fixes, then i'll tag this fix.

🍺

Thanks.

🍻

@KennedyTedesco sorry a bit dumb question, I had

"require" : {
"kennedytedesco/validation": "~1.0.0"
}

When I run composer update it didnt updated to 1.2.0

Nah, ignore this, because its the same version, I didnt see any update progress from composer.
But when I check the code its already corrected.

Closed once more ...

No problem. :) Good luck!