<?php

namespace App\Forms\Equipment;

class LineForm extends EquipmentForm
{
  public function __construct()
  {
    parent::__construct();
  }
  public function getFormRule(string $action, string $field): string
  {
    switch ($field) {
      case "bandwith":
      case "type":
        $rule = "required|trim|string";
        break;
      case "start_at":
      case "end_at":
        $rule = "permit_empty|valid_date";
        break;
      default:
        $rule = parent::getFormRule($action, $field);
        break;
    }
    return $rule;
  }
}
