Beispiel #1
0
 /**
  * @inheritdoc
  */
 public function rules()
 {
     return [[['license_no', 'trader_name', 'trader_name_en', 'effective_date', 'expire_date'], 'required'], [['effective_date', 'expire_date'], 'safe'], [['mobile_no', 'created_at', 'updated_at', 'created_by', 'updated_by', 'status'], 'integer'], [['license_no'], 'string', 'max' => 8], [['trader_name', 'trader_name_en'], 'string', 'max' => 128], [['category', 'address', 'telephone', 'email'], 'string', 'max' => 255], [['province', 'amphur', 'district', 'zipcode'], 'string', 'max' => 5], ['license_no', 'exist', 'targetClass' => TourCompany::className()]];
 }
 /**
  * @inheritdoc
  */
 public function rules()
 {
     return [[['trader_name', 'address', 'mobile_no', 'email'], 'required'], [['user_id', 'province', 'amphur', 'zipcode'], 'integer'], [['license_no'], 'string', 'max' => 8], [['effective_date', 'expire_date'], 'safe'], [['trader_name', 'trader_name_en', 'trader_category', 'address', 'mobile_no', 'telephone', 'email'], 'string', 'max' => 255], ['license_no', 'exist', 'targetClass' => TourCompany::className(), 'message' => 'ไม่พบเลขที่ใบอนุญาตในระบบ หรือ อาจยังไม่ได้ลงทะเบียนในระบบ จากกรมการท่องเที่ยว.']];
 }