Initial commit of the L'Ami Fiduciaire SaaS platform built on Laravel 12, Vue 3, Inertia.js 2, and Tailwind CSS 4. Story 0.1 (rename folders to declarations in database) is implemented and code-reviewed: migration, rollback, and 6 Pest tests all passing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
30 lines
688 B
PHP
30 lines
688 B
PHP
<?php
|
|
|
|
namespace App\Concerns;
|
|
|
|
use Illuminate\Contracts\Validation\Rule;
|
|
use Illuminate\Validation\Rules\Password;
|
|
|
|
trait PasswordValidationRules
|
|
{
|
|
/**
|
|
* Get the validation rules used to validate passwords.
|
|
*
|
|
* @return array<int, Rule|array<mixed>|string>
|
|
*/
|
|
protected function passwordRules(): array
|
|
{
|
|
return ['required', 'string', Password::default(), 'confirmed'];
|
|
}
|
|
|
|
/**
|
|
* Get the validation rules used to validate the current password.
|
|
*
|
|
* @return array<int, Rule|array<mixed>|string>
|
|
*/
|
|
protected function currentPasswordRules(): array
|
|
{
|
|
return ['required', 'string', 'current_password'];
|
|
}
|
|
}
|