implement registration
This commit is contained in:
33
common/models/CardEventRegistrationForm.php
Normal file
33
common/models/CardEventRegistrationForm.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
namespace common\models;
|
||||
use common\components\Helper;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: rocho
|
||||
* Date: 2018.12.17.
|
||||
* Time: 6:14
|
||||
*/
|
||||
|
||||
class CardEventRegistrationForm extends \yii\base\Model
|
||||
{
|
||||
public $card_number;
|
||||
public $event_id;
|
||||
public $registration;
|
||||
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
[['card_number'], 'validateFormat' ]
|
||||
];
|
||||
}
|
||||
|
||||
public function validateFormat(){
|
||||
$this->card_number = Helper::fixAsciiChars( $this->card_number );
|
||||
}
|
||||
|
||||
public function getIsNewRecord(){
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user