<?php

namespace App\Forms\Customer\Wallet;

class AccountForm extends WalletForm
{
  public function __construct()
  {
    parent::__construct();
  }
  public function getFormRule(string $action, string $field): string
  {
    switch ($field) {
      case "user_uid":
      case "clientinfo_uid":
      case "amount":
        $rule = "required|numeric";
        break;
      case "bank":
      case "title":
      case "alias":
      case "status":
        $rule = "required|trim|string";
        break;
      case "issue_at":
        $rule = "required|valid_date";
        break;
      case "content":
        $rule = "permit_empty|trim|string";
        break;
      default:
        $rule = parent::getFormRule($action, $field);
        break;
    }
    return $rule;
  }
}
