Preview: contactusForm.php
                Size: 889 B
              
              
                
              
            
            /home/jambtst2015/public_html/protected/models/contactusForm.php
            <?php
/**
 * LoginForm class.
 * LoginForm is the data structure for keeping
 * user login form data. It is used by the 'login' action of 'SiteController'.
 */
class contactusForm extends CFormModel
{
	public $address;
	public $email;
	public $phone;
	public $googlemapcode;
	/**
	 * Declares the validation rules.
	 * The rules state that username and password are required,
	 * and password needs to be authenticated.
	 */
	public function rules()
	{
		return array(
			// username and password are required
			array('address, email,phone', 'required'),
			array('phone', 'length','min'=>10,'max'=>13),
			array('email', 'email'),
			array('phone', 'numerical', 'integerOnly'=>true),
			// rememberMe needs to be a boolean
			//array('rememberMe', 'boolean'),
			// password needs to be authenticated
			array('googlemapcode', 'safe'),
		);
	}
	
}
                                          Directory Contents
Dirs: 0 × Files: 45