Index: src/main/java/it/finki/charitable/controller/DonationPostController.java
===================================================================
--- src/main/java/it/finki/charitable/controller/DonationPostController.java	(revision 7888b17443c71c7e2c64f2beae81d2a29dc74d25)
+++ src/main/java/it/finki/charitable/controller/DonationPostController.java	(revision b8a8d06919de0726fc27a89a4ef148c8a5763055)
@@ -50,5 +50,5 @@
                           @RequestParam String telekom,
                           @RequestParam String a1,
-                          @RequestParam(defaultValue = "2021-01-01") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate dateDue,
+                          @RequestParam(defaultValue = "2020-01-01") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate dateDue,
                           @RequestParam String bankAccount,
                           @RequestParam MultipartFile titleImage,
@@ -56,4 +56,15 @@
                           @RequestParam MultipartFile[] moderatorImages) {
 
+        System.out.println(moderatorImages.length);
+        if(titleImage.isEmpty() || (moderatorImages.length == 1 && moderatorImages[0].isEmpty())) {
+            model.addAttribute("error", true);
+            return "upload";
+        }
+
+        if(title.isBlank() || fundsNeeded.isBlank() || currency.isBlank() || description.isBlank() || bankAccount.isBlank() || dateDue.equals(LocalDate.of(2020,1,1))) {
+            model.addAttribute("error", true);
+            return "upload";
+        }
+
         DonationPost post = new DonationPost();
         post.setTitle(title);
@@ -61,7 +72,12 @@
         try {
             float funds = Float.parseFloat(fundsNeeded);
+            if (funds <= 0) {
+                model.addAttribute("error", true);
+                return "upload";
+            }
             post.setFundsNeeded(funds);
         } catch (NumberFormatException e) {
-            e.printStackTrace();
+            model.addAttribute("error", true);
+            return "upload";
         }
 
@@ -215,5 +231,5 @@
     }
 
-    @RequestMapping("/donate")
+    @RequestMapping(value="/donate", method = RequestMethod.POST)
     public String donate(Model model, @RequestParam Long postid,
                          @RequestParam String cardName,
@@ -221,8 +237,23 @@
                          @RequestParam String expiryDate,
                          @RequestParam String cvv,
-                         @RequestParam float amount) {
+                         @RequestParam String amount) {
 
         DonationPost post = donationPostService.getById(postid);
-        FundsCollected funds = new FundsCollected("Online donation", amount);
+        if(post == null || !post.getApproved()) {
+            return "index";
+        }
+
+        float donatedAmount;
+        try {
+            donatedAmount = Float.parseFloat(amount);
+            if (donatedAmount <= 0) {
+                return String.format("redirect:/post?postid=%d&error", postid);
+            }
+            post.setFundsNeeded(donatedAmount);
+        } catch (NumberFormatException e) {
+            return String.format("redirect:/post?postid=%d&error", postid);
+        }
+
+        FundsCollected funds = new FundsCollected("Online donation", donatedAmount);
         fundsCollectedService.save(funds);
 
@@ -230,5 +261,5 @@
         donationPostService.save(post);
 
-        DonationInformation donationInformation = new DonationInformation(amount, post.getId(), post.getTitle());
+        DonationInformation donationInformation = new DonationInformation(donatedAmount, post.getId(), post.getTitle());
         donationInformationService.save(donationInformation);
         MainUser user = (MainUser) userService.loadUserByUsername(SecurityContextHolder.getContext().getAuthentication().getName());
@@ -239,5 +270,5 @@
     }
 
-    @RequestMapping("/report")
+    @RequestMapping(value="/report", method = RequestMethod.POST)
     public String report(@RequestParam Long postid,
                          @RequestParam String description) {
