<?php namespace TPS\API\Http\Requests;

use Webkul\Core\Contracts\Validations\Address;
use Webkul\Core\Contracts\Validations\AlphaNumericSpace;
use Webkul\Core\Contracts\Validations\PhoneNumber;
use Webkul\Customer\Http\Requests\CustomerAddressRequest;
use Webkul\Customer\Rules\VatIdRule;

class AddressRequest extends CustomerAddressRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'company_name' => [new AlphaNumericSpace],
            'first_name'   => ['required', new AlphaNumericSpace],
            'last_name'    => ['required', new AlphaNumericSpace],
            'address1'     => ['required', 'array'],
            'address1.*'   => ['required'],
//            'country'      => ['required', 'alpha'],
            'state'        => ['required', new AlphaNumericSpace],
            'city'         => ['required'],
//            'postcode'     => ['required', 'numeric'],
            'phone'        => ['required', new PhoneNumber],
//            'vat_id'       => [new VatIdRule()],
        ];
    }
}