<?php

namespace App\Http\Requests;


use App\Rules\PasswordValidationRule;
use Illuminate\Validation\Rule;

class ClientRegistration extends BaseRequest
{

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
       return [
            'first_name'=>'required|string',
            'last_name'=>'required|string',
            'email'=>'required|email|unique:users,email',
            'password'=>['required','min:8'],

            'street_no'=>'required|string|max:5|regex:'.$this->street_validation_rule,
            'street_name'=>'required|max:50|regex:'.$this->street_validation_rule,
            'city'=>'required|string|regex:'.$this->script_validation_rule,
            'state'=>'required|string|regex:'.$this->script_validation_rule,
            'zip_code'=>'required|string|min:5|max:5|regex:'.$this->script_validation_rule,
            'phone'=>'required|string|regex:'.$this->script_validation_rule,
            'source_type'=> 'required',
            'birth_date' => 'required|date_format:m/d/Y|before:18 years ago|after:-150 years',
            'ssn' => 'required|min:4|max:4',
        ];

    }
}
