jmms
Version:
Jmms cli tools, Jmms is a java meta-micro-service framework
24 lines (21 loc) • 544 B
JavaScript
const v = require('validator');
module.exports = {
required : function(value) {
if(!v.isEmpty(value)) {
return true;
}
return "Please input the value!";
},
isInt : function(value) {
if(value && v.isInt(value.toString())) {
return true;
}
return "Please input a valid integer value!";
},
isPort : function(value) {
if(v.isPort(value.toString())) {
return true;
}
return "Please input a valid port number!";
}
}