2f3fd laravel 11 upgrade (#436)
* fix password reset bug * upgrade to laravel 11 * composer.lock * fix migration issues * use ValidationRule Contract * rename password_resets table * implemented casts as protected function * update env variables * fix optional property * fix validation issues * use <env> on php unit xml * fix pint * cmposer.lock * composer json fixes * fix composer dependencies, remove faker * remove unused class * remove test class * fix default value for mysql migration * linting * expression syntax fix --------- Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
@@ -2,10 +2,11 @@
|
||||
|
||||
namespace App\Rules;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Contracts\Validation\DataAwareRule;
|
||||
use Illuminate\Contracts\Validation\Rule;
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
|
||||
class IntegrationLogicRule implements DataAwareRule, Rule
|
||||
class IntegrationLogicRule implements DataAwareRule, ValidationRule
|
||||
{
|
||||
private $isConditionCorrect = true;
|
||||
|
||||
@@ -153,6 +154,13 @@ class IntegrationLogicRule implements DataAwareRule, Rule
|
||||
return $this->isConditionCorrect;
|
||||
}
|
||||
|
||||
public function validate(string $attribute, mixed $value, Closure $fail): void
|
||||
{
|
||||
if(!$this->passes($attribute, $value)) {
|
||||
$fail($this->message());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation error message.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user