|string> */ public function rules(): array { return [ /** * Card type id (https://online.tbbank.gov.tm/api/base-app-enums) */ 'card_type_id' => ['sometimes', 'integer', Rule::exists('card_types', 'id')], /** * Region (https://online.tbbank.gov.tm/api/base-app-enums) * * @example ag */ 'region' => ['sometimes', 'string', Rule::in(array_keys(RegionRepo::values()))], /** * Branch id (https://online.tbbank.gov.tm/api/branches) */ 'branch_id' => ['sometimes', 'integer', Rule::exists('branches', 'id')], /** * Customer name * * @example Mahmyt */ 'customer_name' => ['sometimes', 'string', 'max:255'], /** * Customer surname * * @example Allaberdiyev */ 'customer_surname' => ['sometimes', 'string', 'max:255'], /** * Customer patronic name * * @example Öwezowiç */ 'customer_patronic_name' => ['nullable', 'string', 'max:255'], /** * Date of birth * * @example 10.10.2000 */ 'born_at' => ['sometimes', 'before_or_equal:today'], /** * Passport serie * * @example I-AS */ 'passport_serie' => ['sometimes', 'string', Rule::in(PassportRepo::values())], /** * Passport number * * @example 100999 */ 'passport_id' => ['sometimes', 'numeric', 'digits:6'], /** * Card number * * @example 9934 2312 2342 0249 */ 'card_number' => ['sometimes', 'string'], /** * Phone number * * @example 65999990 */ 'phone' => ['sometimes', 'integer', 'between:61000000, 71999999'], /** * Passport (sahypa 1) */ 'passport_one' => ['sometimes', 'file', 'max:2048', 'mimes:jpg,png,jpeg'], /** * Pasport (2-3-nji sahypa) */ 'passport_two' => ['sometimes', 'file', 'max:2048', 'mimes:jpg,png,jpeg'], /** * Pasport (8-9 sahypa) */ 'passport_three' => ['sometimes', 'file', 'max:2048', 'mimes:jpg,png,jpeg'], /** * Pasport (32-nji sahypa) */ 'passport_four' => ['sometimes', 'file', 'max:2048', 'mimes:jpg,png,jpeg'], ]; } }