fix detsta download, fix card move card update

This commit is contained in:
2016-03-18 10:21:28 +01:00
parent 16d25abd7c
commit 1d5a5be5bf
8 changed files with 31 additions and 7 deletions

View File

@@ -90,6 +90,12 @@ class ContractForm extends Model {
'string',
'max' => 24
],
[
[
'bank_account'
],
'validateBankAccount',
],
[
[
'bank_name'
@@ -132,6 +138,18 @@ class ContractForm extends Model {
[[ 'started_at', ], 'date', 'format' =>Yii::$app->formatter->dateFormat , 'timestampAttribute' => 'timestampStart' ,'timestampAttributeFormat' => 'yyyy-MM-dd' ,'timeZone' => 'UTC' ],
];
}
public function validateBankAccount($attribute, $params) {
if ( !is_numeric($this->bank_account)){
$this->addError( $attribute, "A bankszámlaszám csak számokat tartalmazhat!");
}else{
if ( !( strlen($this->bank_account) == 16 || strlen($this->bank_account) == 24 ) ){
$this->addError($attribute,"Bankszámlaszám 16 vagy 24 hosszú!");
}
}
}
public function validateTicketType($attribute, $params) {
$this->ticketType = TicketType::findOne ( $this->ticket_type );
if (! isset ( $this->ticketType )) {