|string> */ public function rules(): array { return [ /** * Card state id (https://online.tbbank.gov.tm/api/base-app-enums) */ 'card_state_id' => ['required', 'integer', Rule::exists('card_states', 'id')], /** * Card type id (https://online.tbbank.gov.tm/api/base-app-enums) */ 'card_type_id' => ['required', 'integer', Rule::exists('card_types', 'id')], /** * Region (https://online.tbbank.gov.tm/api/base-app-enums) * * @example ag */ 'region' => ['required', 'string', Rule::in(array_keys(RegionRepo::values()))], /** * Branch id (https://online.tbbank.gov.tm/api/branches) */ 'branch_id' => ['required', 'integer', Rule::exists('branches', 'id')], /** * Customer name * * @example Mahmyt */ 'customer_name' => ['required', 'string', 'max:255'], /** * Customer surname * * @example Allaberdiyev */ 'customer_surname' => ['required', 'string', 'max:255'], /** * Customer patronic name * * @example Öwezowiç */ 'customer_patronic_name' => ['nullable', 'string', 'max:255'], /** * Date of birth * * @example 10.10.2000 */ 'born_at' => ['required', 'before_or_equal:today'], /** * Old surname */ 'old_surname' => ['nullable', 'string', 'max:255'], /** * Passport serie * * @example I-AS */ 'passport_serie' => ['required', 'string', Rule::in(PassportRepo::values())], /** * Passport number * * @example 100999 */ 'passport_id' => ['required', 'numeric', 'digits:6'], /** * Passport date of issue * * @example 10.10.2020 */ 'passport_given_at' => ['required', 'date', 'before_or_equal:today'], /** * Passport given by * * @example Ashgabat shaher polisiya tarapyndan */ 'passport_given_by' => ['required', 'string', 'max:255'], /** * Born place * * @example Ashgabat shaher */ 'born_place' => ['required', 'string', 'max:255'], /** * Işleýän ýeriňiz we wezipäňiz * * @example Aşgabat şäheriniň "TÜRKMENBAŞY" PAÝDARLAR TÄJIRÇILIK bankynyň Baş bugalteri */ 'job_location' => ['required', 'string', 'max:255'], /** * Passport address * * @example Kemine 100/190 */ 'passport_address' => ['required', 'string', 'max:255'], /** * Real address * * @example Kemine 100/190 */ 'real_address' => ['required', 'string', 'max:255'], /** * Phone number * * @example 65999990 */ 'phone' => ['required', 'integer', 'between:61000000, 71999999'], /** * Phone number (additional) * * @example 65999990 */ 'phone_additional' => ['nullable', 'integer', 'between:61000000, 71999999'], /** * Passport (sahypa 1) */ 'passport_one' => ['required', 'file', 'max:2048', 'mimes:jpg,png,jpeg'], /** * Pasport (2-3-nji sahypa) */ 'passport_two' => ['required', 'file', 'max:2048', 'mimes:jpg,png,jpeg'], /** * Pasport (8-9 sahypa) */ 'passport_three' => ['required', 'file', 'max:2048', 'mimes:jpg,png,jpeg'], /** * Pasport (32-nji sahypa) */ 'passport_four' => ['required', 'file', 'max:2048', 'mimes:jpg,png,jpeg'], ]; } }