39 lines
751 B
PHP
39 lines
751 B
PHP
<?php
|
|
|
|
namespace App\Forms\Auth;
|
|
|
|
use App\Forms\CommonForm;
|
|
|
|
class GoogleForm extends CommonForm
|
|
{
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
|
|
public function getFormFields(): array
|
|
{
|
|
return ["access_code"];
|
|
}
|
|
public function getFormFilters(): array
|
|
{
|
|
return [];
|
|
}
|
|
public function getBatchjobButtons(): array
|
|
{
|
|
return [];
|
|
}
|
|
public function getFormRule(string $action, string $field, array $rules = []): array
|
|
{
|
|
$rules = parent::getFormRule($action, $field, $rules);
|
|
switch ($field) {
|
|
case "access_code":
|
|
$rules[$field] = "required|trim|string";
|
|
default:
|
|
$rules = parent::getFormRule($action, $field, $rules);
|
|
break;
|
|
}
|
|
return $rules;
|
|
}
|
|
}
|