vuejs2 - VeeValidate - 如何验证应该使用 http:// 的 URL
问题描述
我试图通过以下方式验证我的输入:
<input
type="text"
name="webhookURL"
placeholder="Enter webhook URL"
class="text-input"
v-validate="'required|url'"
/>
但是如果我像这样填写输入,它会返回 true:google.com,所以如果我像这样填写http://exampleURL.com(使用 http:// 或 https://) ,我需要验证返回 true
解决方案
推荐阅读
- c# - Azure DevOps NuGet Pack 忽略 csproj 包详细信息
- python - 询问用户他们收集了多少天的宝石
- opengl - 如何在 Python OpenGL 中移动箭头的原点?
- opengl - 活塞中的纹理转换
- css - Wordpress 和 Elementor 不显示所有样式(仅在定制器预览中显示)
- css - Blazor + Bootstrap + SCSS 中的 CSS 隔离:可以吗?(::深度选择器)
- python - 如何将一维 numpy 数组拆分为块,每个块的长度取决于条件
- sql - 结构和数组 - 错误:标量子查询产生了多个元素
- c# - 如何在 Windows 10 中打开“输入网络凭据”
- javascript - moment 和 moment.utc 有什么区别