Rules defined as in model class:
public function rules() {
return array(
//
// SUBSCRIPTION OPTIONS
array('subscription', 'required', 'message' => 'Please choose the subscription above that’s best for you.'),
array('subscription', 'in', 'range' => array_keys(self::getSubscriptionOptions()), 'message' => 'Subscription value({value}) is invalid.'),
//
// PERSONAL/MAILING INFORMATION
array('firstname, lastname, addr_1, addr_2, city, country, state, postal_code, email, phone', 'required'),
array('firstname, lastname, addr_1, addr_2, city', 'length', 'min' => 4, 'max' => 32),
//
array('postal_code', 'length', 'min' => 3, 'max' => 9),
array('country', 'exists', 'class' => 'Country', 'attribute' => 'country_id', 'allowEmpty' => FALSE),
//
array('email', 'email', 'checkMX' => TRUE, 'checkPort' => TRUE, 'message' => 'Invalid email or could be a fake {attribute}.'),
array('email', 'unique', 'allowEmpty' => FALSE, 'attributeName' => 'member_email', 'className' => 'User', 'message' => 'Using "{value}" your are already subscribed with us. Please renew your subscription.'),
//
// PAYMENT METHODS
array('method, card_no, name_on_card, card_expiry_month, card_expiry_year, card_security_code_cvv', 'required'),
array('card_no', 'numerical', 'integerOnly' => true),
array('method', 'in', 'range' => array_keys(self::getPaymentMethods())),
array('card_security_code_cvv', 'length', 'min' => 3, 'max' => 4),
array('card_expiry_month', 'in', 'range' => array_keys(self::getCardExpiryMonths())),
array('card_expiry_year', 'in', 'range' => array_keys(self::getCardExpiryYears())),
//
array('netbank', 'required'),
array('netbank'),
//
// NEWS LETTER SUBSCRIPTION
array('nlsubscribe', 'boolean'),
);
}
Find model class file here: http://ubuntuone.com/3kz3cu2qpyTpLLyy29WkRj