mactape/la-rules

Laravel rules for verifying the correctness of entered personal data

Installs: 244

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:project

1.1 2025-04-09 15:54 UTC

This package is auto-updated.

Last update: 2025-04-18 07:17:52 UTC


README

Laravel Rules for check personal data

Installation

composer require mactape/la-rules

Usage

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;
use MacTape\LaRules\CorrectPhone;

class SomeFormRequest extends FormRequest
{
    public function authorize(): bool
    {
        return true;
    }

    public function rules(): array
    {
        return [
            'phone' => ['required', 'string', new CorrectPhone],
            'password' => 'required|string|min:6',
        ];
    }
}

Available rules:

  • CorrectPhone
  • CorrectOgrn
  • CorrectInn
  • CorrectSnils