<?php

namespace App\Forms;

use App\Forms\CommonForm;

class MylogForm extends CommonForm
{
  public function __construct()
  {
    parent::__construct();
  }

  public function getFormRule(string $action, string $field): string
  {
    switch ($field) {
      case "user_uid":
        $rule = "required|int";
        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;
  }
}
