![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
hey-validator
Advanced tools
func(prop, value){
return true;
//或者
return "error message";
}
new Valid({
rules:{
a:{
valid: 'int|number|email|url|tel|mobile|globalmobile', //可以自定义
required: true,
maxlen: 1000,
minlen: 2
},
b:{
valid: {
pattern: /^[0-9]+$/,
message: "请输入正确的数字格式"
},
required: true,
min: 1,
max: 5
},
c:{
required: true,
type: 'int',
valid(prop, parent, data){
if(resp.isExsit){
return "错误";
}
return true;
},
validAsync(prop, parent, next, data){
$.ajax('/test').then((resp)){
if(resp.isExsit){
next("已存在");
}
next();
}
}
},
"d.b":{
},
"e[].a":{
}
},
combineRules:[{
parentRef: 'e[]',
refs: ['b', 'c'],
valid(valueb,valuec){
if(condition){
return "a不能大于b";
}
return true;
}
},{
refs: ['b', 'c'],
valid: 'lessThan', //greaterThan
message: "开始时间必须小于结束时间"
},{
refs: ['d', 'e'],
valid: 'equal',
message: "两次密码输入必须一致"
}],
required:['b','c','e','f','e',"d.b","e[].a"],
int:['a'],
number:['a'],
email:['a'],
url:['a'],
tel:['a'],
mobile:['a'],
globalmobile:['a'] //国际号码
});
Valid.config({
valids:{
test(prop, parent, data){
if(condition){
return true;
}
return '';
},
test2:{
pattern: /^[0-9a]+$/,
message: '不符合自定义要求'
}
},
validAsyncs:{
test(prop, parent, next, data){
if(condition){
next();
}
next('');
}
},
combineValids:{
test(value1, value2){
if(condition){
return true;
}
return ''
}
}
})
FAQs
javascript validator
We found that hey-validator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.