<?php

namespace App\Classes\Modules\Accounts\Standards\Validators;

use App\Classes\General\Abstracts\AbstractValidation;
use App\Classes\Modules\Accounts\DataTransferObjects\AuthenticationCredentialsObject;

class UserRegistrationValidation extends AbstractValidation
{


    /**
     * @param AuthenticationCredentialsObject $object
     * @return array
     */
    protected function data($object): array {
        return [
            'email' => $object->getEmail(),
            'name' => $object->getName(),
            'password' => $object->getPassword(),
            'confirm_password' => $object->getConfirmPassword(),
        ];
    }

    /**
     * @return array
     */
    protected function rules(): array {
        return [
            'email' => 'required|email|unique:users',
            'name' => 'required',
            'password' => 'required',
            'confirm_password' => 'required|same:password',

        ];
    }

    /**
     * @return array
     */
    protected function messages(): array {
        return [];
    }




}