<?php

namespace App\Repositories\Core\Auth;

use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rules\Password;

class Passwords
{
    public static function validator($request)
    {
        return Validator::make($request->all(), [
            'password' => ['required', 'confirmed', self::rules()],
        ]);
    }

    public static function rules()
    {
        return Password::min(10)->mixedCase()->numbers()->symbols()->uncompromised();
    }
}
