diff --git a/app/Http/Requests/StoreEntity.php b/app/Http/Requests/StoreEntity.php
index 4f38524..d38922f 100644
--- a/app/Http/Requests/StoreEntity.php
+++ b/app/Http/Requests/StoreEntity.php
@@ -30,4 +30,16 @@ public function rules()
'explanation' => 'required|max:255',
];
}
+
+ public function withValidator($validator)
+ {
+ $validator->after(function ($validator) {
+ $data = $validator->safe();
+
+ if (! empty($data['file']) && ! empty($data['metadata'])) {
+ $validator->errors()->add('file', 'You cannot provide both a file and metadata. Please choose one.');
+ $validator->errors()->add('metadata', 'You cannot provide both metadata and a file. Please choose one.');
+ }
+ });
+ }
}
diff --git a/resources/views/federations/index.blade.php b/resources/views/federations/index.blade.php
index ddd0f37..b465921 100644
--- a/resources/views/federations/index.blade.php
+++ b/resources/views/federations/index.blade.php
@@ -1,10 +1,6 @@
@extends('layouts.index')
@section('title', __('common.federations'))
-
-
-
-
@section('adminOnly_action')
{{ __('common.import') }}
{{ __('common.refresh') }}
@@ -25,7 +21,4 @@
@endif
@endif
-
-
-
@endsection