app/Http/Requests/RegisterRequest.php
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
Get the validation rules that apply to the request.
@return array
Get the validation rules that apply to the request . @return array
public function rules()
    {
        return [
            "email" => ["required", "email", "unique:accounts"],
            "password" => ["required", "string", "unique:accounts", "confirmed", "min:8", 'regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[#$@!%&*?])[A-Za-z\d#$@!%&*?]{8,30}$/']
        ];
    }
public function rules ( ) { return [ " email " => [ " required " , " email " , " unique:accounts " ] , " password " => [ " required " , " string " , " unique:accounts " , " confirmed " , " min:8 " , 'regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[#$@!%&*?])[A-Za-z\d#$@!%&*?]{8,30}$/' ] ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .