Selaa lähdekoodia

[Backend] Abonnements : erreur validation champs "Paiement automatique" #811

refactoring
Guillaume Bourgeois 1 vuosi sitten
vanhempi
commit
900cda619a
2 muutettua tiedostoa jossa 3 lisäystä ja 4 poistoa
  1. +1
    -2
      common/models/Subscription.php
  2. +2
    -2
      common/models/SubscriptionForm.php

+ 1
- 2
common/models/Subscription.php Näytä tiedosto

@@ -92,8 +92,7 @@ class Subscription extends ActiveRecordCommon
return [
[['id_producer', 'id_point_sale'], 'required'],
[['id_user', 'id_producer', 'id_point_sale', 'monday', 'tuesday',
'wednesday', 'thursday', 'friday', 'saturday', 'sunday', 'week_frequency'], 'integer'],
[['auto_payment'], 'boolean'],
'wednesday', 'thursday', 'friday', 'saturday', 'sunday', 'week_frequency', 'auto_payment'], 'integer'],
[['username', 'comment', 'date_begin', 'date_end'], 'safe'],
];
}

+ 2
- 2
common/models/SubscriptionForm.php Näytä tiedosto

@@ -74,9 +74,9 @@ class SubscriptionForm extends Model
public function rules()
{
return [
[['id_producer', 'week_frequency', 'id_point_sale','id'], 'integer'],
[['id_producer', 'week_frequency', 'id_point_sale','id', 'auto_payment'], 'integer'],
[['date_begin', 'date_end'], 'date', 'format' => 'php:d/m/Y'],
[['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday', 'auto_payment'], 'boolean'],
[['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'], 'boolean'],
[['id_point_sale', 'id_producer', 'date_begin'], 'required', 'message' => 'Champs obligatoire'],
[['products', 'id_user', 'username','comment'], 'safe'],
['id_user', function ($attribute, $params) {

Loading…
Peruuta
Tallenna