# orico_vue3_demo

## Project setup
```
npm install
```

### Compiles and hot-reloads for development
```
npm run serve
```

### Compiles and minifies for production
```
npm run build
```

### Lints and fixes files
```
npm run lint
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).


### [vee-validate](https://vee-validate.logaretm.com/v4/) 验证
<table>
    <tr>
        <td>alpha</td>
        <td>alpha_dash</td>
        <td>alpha_num</td>
        <td>alpha_spaces</td>
    </tr>
    <tr>
        <td>between</td>
        <td>confirmed</td>
        <td>dimensions</td>
        <td>email</td>
    </tr>
    <tr>
        <td>excluded</td>
        <td>ext</td>
        <td>image</td>
        <td>one_of</td>
    </tr>
    <tr>
        <td>integer</td>
        <td>is</td>
        <td>is_not</td>
        <td>length</td>
    </tr>
    <tr>
        <td>max</td>
        <td>max_value</td>
        <td>mimes</td>
        <td>min</td>
    </tr>
    <tr>
        <td>max</td>
        <td>max_value</td>
        <td>mimes</td>
        <td>min</td>
    </tr>
    <tr>
        <td>min_value</td>
        <td>numeric</td>
        <td>regex</td>
        <td>required</td>
    </tr>
    <tr>
        <td>size</td>
        <td>url</td>
        <td>mobile</td>
        <td>tel</td>
    </tr>
    <tr>
        <td>identify</td>
        <td>decimal</td>
        <td>letter_upper</td>
        <td>letter_lower</td>
    </tr>
    <tr>
        <td>character_cn</td>
        <td>zipcode</td>
        <td>fax</td>
        <td></td>
    </tr>
</table>

>1. alpha：包含字母字符
```
<!-- string format -->
<Field name="field" rules="alpha" />

<!-- object format -->
<Field name="field" :rules="{ alpha: true }" />
```

>2. alpha_dash：包含字母字符、数字、破折号或下划线
```
<!-- string format -->
<Field name="field" rules="alpha_dash" />

<!-- object format -->
<Field name="field" :rules="{ alpha_dash: true }" />
```

>3. alpha_num：包含字母字符或数字
```
<!-- string format -->
<Field name="field" rules="alpha_num" />

<!-- object format -->
<Field name="field" :rules="{ alpha_num: true }" />
```

>4. alpha_spaces：包含字母字符或空格
```
<!-- string format -->
<Field name="field" rules="alpha_spaces" />

<!-- object format -->
<Field name="field" :rules="{ alpha_spaces: true }" />
```

>5. between：字段必须具有由最小值和最大值限定的数值
```
<!-- string format -->
<Field name="field" rules="between:1,10" />

<!-- object format with shorthand array -->
<Field name="field" :rules="{ between: [1, 10] }" />

<!-- object format with named arguments -->
<Field name="field" :rules="{ between: { min: 1, max: 10 } }" />
```

>6. confirmed：验证的字段必须具有与确认字段相同的值
```
<Form>
  <Field name="password" type="password" />

  <Field name="confirmation" type="password" rules="confirmed:@password" />
</Form>
```

>7. digits：字段必须是数字并且具有指定的位数
```
<!-- string format -->
<Field name="field" rules="digits:3" />

<!-- object format -->
<Field name="field" :rules="{ digits: 3 }" />
```

>8. dimensions：字段的文件必须是具有确切指定维度的图像(jpg、 svg、 jpeg、 png、 bmp、 gif)。
```
<!-- string format -->
<Field name="field" type="file" rules="dimensions:120,120" />

<!-- object format -->
<Field name="field" :rules="{ dimensions: [120, 120] }" />

<!-- object format with named arguments -->
<Field name="field" :rules="{ dimensions: { width: 120, height: 120 } }" />
```

>9. email：字段必须是有效的电子邮件
```
<!-- string format -->
<Field name="field" rules="email" />

<!-- object format -->
<Field name="field" :rules="{ email: true }" />
```

>10. excluded：正在验证的字段必须有一个不在指定列表中的值
```
<!-- string format -->
<Field name="field" rules="excluded:1,3" />

<!-- object format -->
<Field name="field" :rules="{ excluded: [1, 3] }" />
```

>11. ext：字段的文件必须具有指定的扩展名之一
```
<!-- string format -->
<Field name="field" rules="ext:jpg,png" />

<!-- object format -->
<Field name="field" :rules="{ ext: ['jpg', 'png'] }" />
```

>12. image：验证字段中的文件必须具有图像 mime 类型(image/*)
```
<!-- string format -->
<Field name="field" rules="image" />

<!-- object format -->
<Field name="field" :rules="{ image: true }" />
```

>13. integer：验证下的字段必须是有效的整数值。不接受指数表示法
```
<!-- string format -->
<Field name="field" rules="integer" />

<!-- object format -->
<Field name="field" :rules="{ integer: true }" />
```

>14. is：验证下的字段必须匹配给定的值，并使用严格的相等性
```
<!-- string format -->
<Field name="field" rules="is:hello" />

<!-- object format -->
<Field name="field" :rules="{ is: 'hello' }" />
```

>15. is_not：验证下的字段必须与给定的值不匹配，并使用严格相等
```
<!-- string format -->
<Field name="field" rules="is_not:world" />

<!-- object format -->
<Field name="field" :rules="{ is_not: 'world' }" />
```

>16. length：验证下的字段必须具有指定的项数，只能用于迭代对象，允许的迭代值包括字符串、数组和任何可以与 Array.from 一起使用的对象
```
<!-- string format -->
<Field name="field" rules="length:5" />

<!-- object format -->
<Field name="field" :rules="{ length: 5 }" />
```

>17. max：验证长度下的字段不能超过指定的长度
```
<!-- string format -->
<Field name="field" rules="max:10" />

<!-- object format -->
<Field name="field" :rules="{ max: 10 }" />
```

>18. max_value：正在验证的字段必须是一个数值，并且不能大于指定的值
```
<!-- string format -->
<Field name="field" rules="max_value:10" />

<!-- object format -->
<Field name="field" :rules="{ max_value: 10 }" />
```

>19. mimes：在验证下添加到字段的文件类型应该具有指定的 mime 类型之一
```
<!-- string format -->
<Field name="field" rules="mimes:image/jpeg" />

<!-- object format -->
<Field name="field" :rules="{ mimes: ['image/jpeg'] }" />
```

>20. min：验证长度下的字段不应小于指定的长度
```
<!-- string format -->
<Field name="field" rules="min:3" />

<!-- object format -->
<Field name="field" :rules="{ min: 3 }" />
```

>21. min_value：正在验证的字段必须是一个数值，并且不能小于指定的值
```
<!-- string format -->
<Field name="field" rules="min_value:5" />

<!-- object format -->
<Field name="field" :rules="{ min_value: 5 }" />
```

>22. numeric：正在验证的字段必须只包含数字
```
<!-- string format -->
<Field name="field" rules="numeric" />

<!-- object format -->
<Field name="field" :rules="{ numeric: true }" />
```

>23. one_of：正在验证的字段必须具有指定列表中的值
```
<!-- string format -->
<Field name="field" rules="one_of:1,2,3" />

<!-- object format -->
<Field name="field" :rules="{ one_of: [1, 2, 3] }" />
```

>24. regex：验证下的字段必须与指定的正则表达式匹配
```
<!-- string format: NOT RECOMMENDED -->

<!-- object format -->
<Field name="field" :rules="{ regex: /^[0-9]+$/ }" />
```

>25. required：正在验证的字段必须有一个非空值。默认情况下，如果验证器具有“空值”，则所有验证器都通过验证，除非它们是必需的。这些空值是空字符串、未定义、 null、 false 和空数组。
```
<!-- string format -->
<Field name="field" rules="required" />

<!-- object format -->
<Field name="field" :rules="{ required: true }" />
```

>26. size：字段的文件大小不得超过指定的大小(单位为千字节)
```
<!-- string format -->
<Field name="field" type="file" rules="size:250" />

<!-- object format -->
<Field name="field" :rules="{ size: 250 }" />
```

>27. url：验证下的字段必须是有效的 url。如果你需要更多的限制，你可以传递一个模式。
```
<!-- string format -->
<Field name="field" type="url" rules="url" />

<!-- object format -->
<Field name="field" type="text" :rules="{ url: 'https://.*' }" />
```

>29. mobile：验证是否为手机号
```
<!-- string format -->
<Field name="field"  rules="mobile" />
```

>30. tel：验证是否为电话
```
<!-- string format -->
<Field name="field" rules="tel" />
```

>31. identify：
```
<!-- string format -->
<Field name="field" rules="identify" />
```

>32. decimal：验证小数位数
```
<!-- string format -->
<Field name="field" rules="decimal:2" />
```

>33. letter_upper：是否为大写字母
```
<!-- string format -->
<Field name="field" rules="letter_upper" />
```

>34. letter_lower：是否为小写字母
```
<!-- string format -->
<Field name="field" rules="letter_lower" />
```

>35. character_cn：是否为中文字符
```
<!-- string format -->
<Field name="field" rules="character_cn" />
```

>36. zipcode：邮政编码格式验证
```
<!-- string format -->
<Field name="field" rules="zipcode" />
```

>37. fax：传真格式验证
```
<!-- string format -->
<Field name="field" rules="fax" />
```