<?php

namespace App\Forms\Customer\Wallet;

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