All Projects → liuyinglong → Verify

liuyinglong / Verify

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Verify

connection checker
Android library for checking the internet connectivity of a device.
Stars: ✭ 26 (-62.86%)
Mutual labels:  verify
Mtgjson3
MTGJSON repository for Magic Cards
Stars: ✭ 538 (+668.57%)
Mutual labels:  verify
Nexmo Node Code Snippets
NodeJS code examples for using Nexmo
Stars: ✭ 36 (-48.57%)
Mutual labels:  verify
checktestdata
checks integrity of test data in programming contests like the ACM ICPC
Stars: ✭ 19 (-72.86%)
Mutual labels:  verify
Tpinappreceipt
Reading and Validating In App Purchase Receipt Locally.
Stars: ✭ 305 (+335.71%)
Mutual labels:  verify
Awesome bot
✅ Validate links in awesome projects
Stars: ✭ 697 (+895.71%)
Mutual labels:  verify
verify-service-provider
👑 ☑️ The easiest way to connect to GOV.UK Verify
Stars: ✭ 15 (-78.57%)
Mutual labels:  verify
Simplenikeaccountcreator
A simple nike account creator I made using puppeteer and request in node js
Stars: ✭ 47 (-32.86%)
Mutual labels:  verify
React Native Phone Verification
The best React Native example for phone verification (an alternative to Twitter Digits).
Stars: ✭ 332 (+374.29%)
Mutual labels:  verify
Rverify.js
✅❎ A lightweight image rotation verification plugin.
Stars: ✭ 33 (-52.86%)
Mutual labels:  verify
git-conventional-commits
Git Conventional Commits Util to generate Semantic Version and Markdown Change Log and Validate Commit Messag
Stars: ✭ 58 (-17.14%)
Mutual labels:  verify
hoice
An ICE-based predicate synthesizer for Horn clauses.
Stars: ✭ 41 (-41.43%)
Mutual labels:  verify
Keys
Key management is hard
Stars: ✭ 733 (+947.14%)
Mutual labels:  verify
vonage-node-code-snippets
NodeJS code examples for using Nexmo
Stars: ✭ 46 (-34.29%)
Mutual labels:  verify
Id Validator
中国身份证号验证、获取身份证号信息、升级 15 位身份证号为 18 位、伪造符合校验的身份证号。
Stars: ✭ 37 (-47.14%)
Mutual labels:  verify
cfv
Command-line File Verify
Stars: ✭ 36 (-48.57%)
Mutual labels:  verify
Uber Apk Signer
A cli tool that helps signing and zip aligning single or multiple Android application packages (APKs) with either debug or provided release certificates. It supports v1, v2 and v3 Android signing scheme has an embedded debug keystore and auto verifies after signing.
Stars: ✭ 677 (+867.14%)
Mutual labels:  verify
Idtoken Verifier
Lightweight RSA JWT verification
Stars: ✭ 52 (-25.71%)
Mutual labels:  verify
Jose
Universal "JSON Web Almost Everything" - JWA, JWS, JWE, JWT, JWK with no dependencies
Stars: ✭ 1,029 (+1370%)
Mutual labels:  verify
Vue express session nodb
这是一个带有express session验证的vue项目,其中server适用于其他任何前端框架,开发者可以根据自己的需求进行更改;另外session存储不涉及数据库存储,使用的是内存存储。
Stars: ✭ 24 (-65.71%)
Mutual labels:  verify

verify

install

npm install vue-verify-plugin

use

<template>
	<div class="input-box clearFix">
		<div>
			<input v-model="age" v-verify="age" placeholder="age"/>
			<label class="fl" v-remind="age"></label>
		</div>
		<div>
			<input type="text" class="phoneIcon fl" placeholder="手机号码" v-model="regInfo.phone" v-verify="regInfo.phone">
			<label class="fl" v-remind="regInfo.phone"></label>
		</div>
		<button v-on:click="submit">提交</button>
	</div>
</template>

<script>
    import Vue from "vue";
    import verify from "vue-verify-plugin";
    Vue.use(verify,{
        blur:true
    });
    export default {
        name: 'app',
        data () {
            return {
                age:"",
                regInfo: {
                    phone: ""
                }
            }
        },
        verify: {
            age:"required",
            regInfo: {
                phone: ["required","mobile"]
            }
        },
        methods:{
            submit: function () {
                console.log(this.$verify.check());
            }
        }
    }
</script>

验证错误信息说明

验证之后的错误存储在 vm.$verify.$errors 中,可自行打印出 vm.$verify.$errorArray 存储上一次验证的错误

配置说明

配置传入一个对象

{
    rules:{}//自定义验证方法
    blur:Bool //失去焦点时 是否开启验证
}

指令说明

v-verify

在表单控件元素上创建数据的验证规则,他会自动匹配要验证的值以及验证的规则。

v-verify 修饰符说明

该指令最后一个修饰符为自定义分组

//自定义teacher分组
v-verify.teacher
//自定义student分组
v-verify.student

//验证时可分开进行验证  

//验证student 分组
this.$verify.check("student")
//验证teacher 分组
this.$verify.check("teacher")
//验证所有
this.$verify.check();
v-verify指令也可使用 arg参数进行验证分组

如果同时使用修饰符和arg分组 则arg会覆盖修饰符分组

v-verify:student
//验证student 分组
this.$verify.check("student")
v-remind 验证错误提示
v-remind修饰符说明

.join 展示所有错误 用逗号隔开

v-verified (在2.0版本中 被v-remind替代)

v-verified 错误展示,当有错误时会展示,没有错误时会加上style:none,默认会展示该数据所有错误的第一条
该指令为语法糖(见示例)

<input v-model="username" v-verify="username">
<label v-show="$verify.$errors.username && $verify.$errors.username.length" v-text="$verify.$errors.username[0]"></label>
<!--等价于-->
<label v-verified="$verify.$errors.username"></label>
v-verified 修饰符说明

.join 展示所有错误 用逗号隔开

默认验证规则
  • email 邮箱规则验证
  • mobile 手机号码验证
  • required 必填
  • url 链接规则验证
  • maxLength 最多maxLength个字符串(可自定义message)
  • minLength 最少minLength个字符串(可自定义)
<script>
verify: {
    username: [
        "required",
        {
            minLength:2,
            message: "姓名不得小于两位"
        },
        {
            maxLength:5,
            message: "姓名不得大于5位"
        }
    ],
    mobile:["required","mobile"],
    email:"email"
    url:"url"
    pwd: {
        minLength:6,
        message: "密码不得小于6位"
    }
},
</script>


自定义验证规则一

    import Vue from "vue";
    import verify from "vue-verify-plugin";
    var myRules={
        max6:{
            test:function(val){
                if(val.length>6) {
                    return false
                }
                return true;
            },
            message:"最大为6位"
        }
        
    };
    Vue.use(verify,{
        rules:myRules
    });
    export default {
        name: 'app',
        data () {
            return {
                age:"",
                teacher:"",
                regInfo: {
                    phone: ""
                }
            }
        },
        verify: {
            age:"required",
            teacher:"max6",
            regInfo: {
                phone: ["required","mobile"]
            }
        },  
        methods:{
            submit: function () {
                console.log(this.$verify.check());
            }
        }
    }

自定义验证规则二

    import Vue from "vue";
    import verify from "vue-verify-plugin";
    
    export default {
        name: 'app',
        data () {
            return {
                age:"",
                teacher:"",
                regInfo: {
                    phone: ""
                }
            }
        },
        verify: {
            age:"required",
            teacher:[
                {
                 	test:function(val){
                    	if(val.length>6) {
                            return false
                        }
                        return true;
                    },
                    message:"最大为6位"  
                }
            ],
            regInfo: {
                phone: ["required","mobile"]
            }
        },  
        methods:{
            submit: function () {
                console.log(this.$verify.check());
            }
        }
    }
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].