<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                ## 驗證規則 全部的驗證類型與對應的驗證選項如下,大部分能根據語義理解,特殊的幾個下文會單獨說明。 ~~~ // 規則 public function rules() { return [ 'a' => ['integer', 'unsigned' => true, 'min' => 1, 'max' => 1000000, 'length' => 10, 'minLength' => 3, 'maxLength' => 5], 'b' => ['double', 'unsigned' => true, 'min' => 1, 'max' => 1000000, 'length' => 10, 'minLength' => 3, 'maxLength' => 5], 'c' => ['alpha', 'length' => 10, 'minLength' => 3, 'maxLength' => 5], 'd' => ['alphaNumeric', 'length' => 10, 'minLength' => 3, 'maxLength' => 5], 'e' => ['string', 'length' => 10, 'minLength' => 3, 'maxLength' => 5, 'filter' => ['trim', 'strip_tags', 'htmlspecialchars']], 'f' => ['email', 'length' => 10, 'minLength' => 3, 'maxLength' => 5], 'g' => ['phone'], 'h' => ['url', 'length' => 10, 'minLength' => 3, 'maxLength' => 5], 'i' => ['in', 'range' => ['A', 'B'], 'strict' => true], 'j' => ['date', 'format' => 'Y-m-d'], 'k' => ['compare', 'compareAttribute' => 'a'], 'l' => ['match', 'pattern' => '/^[\w]{1,30}$/'], 'm' => ['call', 'callback' => [$this, 'check']], 'n' => ['file', 'mimes' => ['audio/mp3', 'video/mp4'], 'maxSize' => 1024 * 1], 'r' => ['image', 'mimes' => ['image/gif', 'image/jpeg', 'image/png'], 'maxSize' => 1024 * 1], ]; } ~~~ ## `call` 驗證類型 該類型為用戶自定義驗證規則,`callback` 內指定一個用戶自定義的方法來驗證。 自定義的方法如下: ~~~ // 自定義驗證 public function check($fieldValue) { // 驗證代碼 // ... // 返回結果 return true; } ~~~ >[info] 返回 true 通過驗證,false 返回錯誤。 ## `file` / `image` 驗證類型 該類型用來驗證文件,包含的兩個驗證選項如下: - mimes:輸入你想要限制的文件mime類型,[MIME參考手冊](http://www.w3school.com.cn/media/media_mimeref.asp) 。 - maxSize:允許的文件最大尺寸,單位 KB。 驗證成功后模型類會增加一個同名屬性,該屬性為 `mix\http\UploadFile` 類的實例化對象,在模型內可直接調用 `$this->[attributeName]->saveAs($filename)` 另存為你需要存放的位置,更多方法請查看 "文件上傳" 章節。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看