+
+ if 'plan' in cleaned_data:
+ cleaned_data['amount'] = self.fields['amount'].clean(
+ self.request.POST['amount-{}'.format(cleaned_data['plan'].id)]
+ )
+
+ if cleaned_data['amount'] < cleaned_data['plan'].min_amount:
+ self.add_error(
+ 'amount',
+ 'Minimalna kwota dla tego planu to %d zł.' % cleaned_data['plan'].min_amount
+ )
+