Preview: UserprofileForm.php
Size: 1.05 KB
/home/jambtst2015/public_html/protected/models/UserprofileForm.php
<?php
/**
* ContactForm class.
* ContactForm is the data structure for keeping
* contact form data. It is used by the 'contact' action of 'SiteController'.
*/
class UserprofileForm extends CFormModel
{
public $name;
public $phone_number;
public $email;
/**
* Declares the validation rules.
*/
public function rules()
{
return array(
// name, email, subject and body are required
array('name', 'required'),
//email has to be a valid email address
array('email', 'email'),
//array('email', 'unique'),
array('phone_number', 'numerical', 'integerOnly'=>true),
array('phone_number', 'length','max'=>13,'min'=>10),
// verifyCode needs to be entered correctly
//array('verifyCode', 'captcha', 'allowEmpty'=>!CCaptcha::checkRequirements()),
);
}
/**
* Declares customized attribute labels.
* If not declared here, an attribute would have a label that is
* the same as its name with the first letter in upper case.
*/
public function attributeLabels()
{
return array(
'verifyCode'=>'Verification Code',
);
}
}
Directory Contents
Dirs: 0 × Files: 45