我有两个输入字段:url
和email
我正在使用Vuelidate
并且我想制作一个自定义验证器,用于检查 url 域名是否等于电子邮件域名。
有效示例:
网址:(https://)www.mydomain.example
电子邮件:johndoe@mydomain.example
无效示例:
网址:(https://)www.mydomain.example
电子邮件:johndoe@somedomaine.example
验证对象:
validations: {
form: {
url: { required, url, maxLength: maxLength(2083) },
email: { required, email, maxLength: maxLength(255) },
lastName: { required, maxLength: maxLength(100) },
firstName: { required, maxLength: maxLength(100) }
}
},