<?php

/**
 * Clase que representa los datos enviados por el usuario a través 
 * del formulario de registro de la página de entrada.
 */
class FormularioRegistro extends CFormModel {

    public $email;
    public $password;
    public $password2;

    /**
     * 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('email, password, password2', 'required'),
            array('email', 'email'),
            array('password', 'compare', 'compareAttribute' => 'password2'),
        );
    }
}
