Example #1
0
 public function rules()
 {
     return array_merge(parent::rules(), [[['name', 'firstname', 'lastname'], 'required'], [['email'], 'email'], [['zipcode'], 'string', 'max' => 16], [['phone'], 'string', 'max' => 32], [['name', 'firstname', 'lastname', 'email', 'state', 'city'], 'string', 'max' => 64], [['contact'], 'string', 'max' => 128], [['address'], 'string', 'max' => 255], [['type', 'status', 'country_id', 'state_id', 'parent_id', 'volunteer', 'candidate'], 'integer'], [['notes'], 'safe']]);
 }
Example #2
0
 public function rules()
 {
     return array_merge(parent::rules(), [[['name', 'format', 'content'], 'required'], [['content', 'wrapper'], 'string'], [['status', 'wrapper_enabled', 'orientation_landscape', 'margin_top', 'margin_bottom', 'margin_left', 'margin_right', 'items_per_page'], 'integer'], [['items_per_page'], 'default', 'value' => 0], [['margin_top', 'margin_bottom'], 'default', 'value' => 16], [['margin_left', 'margin_right'], 'default', 'value' => 15], [['wrapper'], 'default', 'value' => '{content}']]);
 }
Example #3
0
 public function rules()
 {
     return array_merge(parent::rules(), [[['name'], 'required'], [['status'], 'integer'], [['name', 'from_name', 'from_email', 'reply_to'], 'string', 'max' => 255], [['from_email', 'reply_to'], 'email']]);
 }
Example #4
0
 public function rules()
 {
     return array_merge(parent::rules(), [[['subject'], 'required'], [['body'], 'string'], [['subject'], 'string', 'max' => 255]]);
 }
Example #5
0
File: Task.php Project: vsguts/crm
 /**
  * @inheritdoc
  */
 public function rules()
 {
     return array_merge(parent::rules(), [[['name', 'user_id', 'timestamp'], 'required'], [['done'], 'integer'], [['notes'], 'string']]);
 }