fix detsta download, fix card move card update
This commit is contained in:
@@ -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 )) {
|
||||
|
||||
Reference in New Issue
Block a user