Search code examples
phpvalidationlaravellaravel-5laravel-validation

Laravel 5.2 validation distinct gives 'Method does not exist' error


I'm trying to validate an array on unique ID's. I'm trying to use Laravel's distinct method. When using this method I get this error: Method [validateDistinct] does not exist.

I was reading through the documentation saw a difference in the 5.2 and master documentation. I'm using version 5.2.19. When looking at the version 5.2 documentation there is a distinct rule but the master version documentation doesn't have this rule.

So basically my question is: How can I use the distinct validation rule in Laravel 5.2? Or what am I doing wrong?


Solution

  • you need to upgrade to version 5.2.22