Your IP : 216.73.216.51


Current Path : /var/www/html/dvs/backend/models/
Upload File :
Current File : /var/www/html/dvs/backend/models/ProfileForm.php

<?php

namespace backend\models;

use yii\base\Model;
use Yii;

/**
 * Signup form
 */
class ProfileForm extends Model {

    public $staff_photo;
    public $username;
    public $staff_name;
    public $staff_ic;
    public $gender;
    public $email;
    public $phone_no;
    public $mobile_no;
    public $office_no;
    public $office_ext_no;
    public $file;
    public $fullname;

    /**
     * @inheritdoc
     */
    public function rules() {
        return [
            [['email','fullname'], 'safe'],
            [['staff_ic'], 'string', 'max' => 14],
            [['created_at', 'updated_at'], 'safe'],
            [['staff_name'], 'string', 'max' => 1000],
            ['file', 'file', 'extensions' => ['png', 'jpg', 'jpeg'], 'maxSize' => 45000],
            [['file','staff_photo'], 'safe'],
            [['office_ext_no'], 'string', 'max' => 5],
            [['gender'], 'string', 'max' => 1],
            [['phone_no', 'mobile_no', 'office_no'], 'string', 'max' => 12],
            [['staff_photo'], 'string', 'max' => 50],
        ];
    }

    /**
     * @return array customized attribute labels (name=>label)
     */
    public function attributeLabels() {
        return [
            'staff_photo' => Yii::t('app', ''),
            'username' => Yii::t('app', 'Username'),
            'fullname' => Yii::t('app', 'Full name'),
            'staff_name' => Yii::t('app', 'Full name'),
            'gender' => Yii::t('app', 'Gender'),
            'email' => Yii::t('app', 'Email'),
            'phone_no' => Yii::t('app', 'Phone Number')
        ];
    }



}