Affiliate::rules PHP Method

rules() public method

public rules ( ) : array
return array validation rules for model attributes.
    public function rules()
    {
        // NOTE: you should only define rules for those attributes that
        // will receive user inputs.
        return array(array('firstname, lastname, email, telephone, fax, password, salt, company, website, address_1, address_2, city, postcode, country_id, zone_id, code, tax, payment, cheque, paypal, bank_name, bank_branch_number, bank_swift_code, bank_account_name, bank_account_number, ip, status, approved, date_added', 'required'), array('country_id, zone_id, status, approved', 'numerical', 'integerOnly' => true), array('firstname, lastname, telephone, fax, company', 'length', 'max' => 32), array('email', 'length', 'max' => 96), array('password, ip', 'length', 'max' => 40), array('salt', 'length', 'max' => 9), array('website', 'length', 'max' => 255), array('address_1, address_2, city', 'length', 'max' => 128), array('postcode', 'length', 'max' => 10), array('code, tax, paypal, bank_name, bank_branch_number, bank_swift_code, bank_account_name, bank_account_number', 'length', 'max' => 64), array('commission', 'length', 'max' => 4), array('payment', 'length', 'max' => 6), array('cheque', 'length', 'max' => 100), array('affiliate_id, firstname, lastname, email, telephone, fax, password, salt, company, website, address_1, address_2, city, postcode, country_id, zone_id, code, commission, tax, payment, cheque, paypal, bank_name, bank_branch_number, bank_swift_code, bank_account_name, bank_account_number, ip, status, approved, date_added', 'safe', 'on' => 'search'));
    }