Remove global rules
This commit is contained in:
parent
c433abbbb4
commit
7cc3d4197b
|
@ -120,17 +120,4 @@ class BdkjHesse extends ContributionDocument
|
||||||
{
|
{
|
||||||
return 'BDKJ Hessen';
|
return 'BDKJ Hessen';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array<string, mixed>
|
|
||||||
*/
|
|
||||||
public static function rules(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'dateFrom' => 'required|string|date_format:Y-m-d',
|
|
||||||
'dateUntil' => 'required|string|date_format:Y-m-d',
|
|
||||||
'country' => 'required|integer|exists:countries,id',
|
|
||||||
'zipLocation' => 'required|string',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,17 +77,4 @@ class CityFrankfurtMainDocument extends ContributionDocument
|
||||||
{
|
{
|
||||||
return 'Frankfurt';
|
return 'Frankfurt';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array<string, mixed>
|
|
||||||
*/
|
|
||||||
public static function rules(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'dateFrom' => 'required|string|date_format:Y-m-d',
|
|
||||||
'dateUntil' => 'required|string|date_format:Y-m-d',
|
|
||||||
'country' => 'required|integer|exists:countries,id',
|
|
||||||
'zipLocation' => 'required|string',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,17 +73,4 @@ class CityRemscheidDocument extends ContributionDocument
|
||||||
{
|
{
|
||||||
return 'Remscheid';
|
return 'Remscheid';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array<string, mixed>
|
|
||||||
*/
|
|
||||||
public static function rules(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'dateFrom' => 'required|string|date_format:Y-m-d',
|
|
||||||
'dateUntil' => 'required|string|date_format:Y-m-d',
|
|
||||||
'zipLocation' => 'required|string',
|
|
||||||
'country' => 'required|integer|exists:countries,id',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,16 +97,4 @@ class CitySolingenDocument extends ContributionDocument
|
||||||
{
|
{
|
||||||
return 'Stadt Solingen';
|
return 'Stadt Solingen';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array<string, mixed>
|
|
||||||
*/
|
|
||||||
public static function rules(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'dateFrom' => 'required|string|date_format:Y-m-d',
|
|
||||||
'dateUntil' => 'required|string|date_format:Y-m-d',
|
|
||||||
'zipLocation' => 'required|string',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,23 +21,6 @@ abstract class ContributionDocument extends Document
|
||||||
*/
|
*/
|
||||||
abstract public static function fromApiRequest(array $request): self;
|
abstract public static function fromApiRequest(array $request): self;
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array<string, mixed>
|
|
||||||
*/
|
|
||||||
abstract public static function rules(): array;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array<string, mixed>
|
|
||||||
*/
|
|
||||||
public static function globalRules(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'eventName' => 'required|string',
|
|
||||||
'members' => 'present|array|min:1',
|
|
||||||
'members.*' => 'integer|exists:members,id',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function buttonName(): string
|
public static function buttonName(): string
|
||||||
{
|
{
|
||||||
return 'Für ' . static::getName() . ' erstellen';;
|
return 'Für ' . static::getName() . ' erstellen';;
|
||||||
|
|
|
@ -68,17 +68,4 @@ class RdpNrwDocument extends ContributionDocument
|
||||||
{
|
{
|
||||||
return 'RdP NRW';
|
return 'RdP NRW';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array<string, mixed>
|
|
||||||
*/
|
|
||||||
public static function rules(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'dateFrom' => 'required|string|date_format:Y-m-d',
|
|
||||||
'dateUntil' => 'required|string|date_format:Y-m-d',
|
|
||||||
'country' => 'required|integer|exists:countries,id',
|
|
||||||
'zipLocation' => 'required|string',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,16 +64,4 @@ class WuppertalDocument extends ContributionDocument
|
||||||
{
|
{
|
||||||
return 'Wuppertal';
|
return 'Wuppertal';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array<string, mixed>
|
|
||||||
*/
|
|
||||||
public static function rules(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'dateFrom' => 'required|string|date_format:Y-m-d',
|
|
||||||
'dateUntil' => 'required|string|date_format:Y-m-d',
|
|
||||||
'zipLocation' => 'required|string',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue