days a client receives a letter from the collection. * @package Models * @author Oreolek **/ class Model_Subscription extends ORM { /** * @return array validation rules **/ public function rules() { return array( 'title' => array( array('not_empty'), array('min_length', array(':value', 4)), array('max_length', array(':value', 100)), ) 'description' => array( array('not_empty'), array('min_length', array(':value', 20)), ), 'period' => array( array('numeric') ), 'price' => array( array('numeric') ) ); } /** * Array of field labels. * Used in forms. **/ protected $_labels = array( 'title' => 'Title', 'price' => 'Subscription price', 'period' => 'Mailing period (in days)', 'description' => 'Description (for the clients)' ); }