32], [['title'], 'string', 'max' => 128], [['notifyClass'], 'string', 'max' => 512], [['amount'], function ($attribute, $params) { if (!is_float($this->amount)) { $this->addError($attribute, '`amount`必须是数字类型。'); } }], [['amount'], 'number', 'min' => 0, 'max' => 100000000], [['payType'], 'safe'], [['supportPayTypes'], 'safe'], ]; } /** * PaymentOrder constructor. * @param array $config */ public function __construct(array $config = []) { parent::__construct($config); if(!$this->validate()){ $this->dde([$this->errors, $this->amount]); } } }