rules:根据预定义规则验证对象(node.js)

规则(node.js)一个微小的规则框架,可用于验证任何值,通过创建规则/模式对象或将验证应用于单个值。在这两种情况下都使用流畅的界面。样品架构您创建一个对象来声明要应用的规则/不变量(类似于模式)。流畅的界面可以轻松地为每个属性指定不变量: var nameRules = { first : mustBe ( ) . populated ( ) . string ( { minLength : 5 , maxLength : 20 } ) , [ 1 ] second : mustBe ( ) . populated ( ) . string ( { minLength : 5 , maxLength : 20 } ) , } var personRules = { name : nameRules , weight :
zip
rules-master.zip 预估大小:79个文件
folder
rules-master 文件夹
file
rules.njsproj 8KB
folder
lib 文件夹
folder
validators 文件夹
folder
date 文件夹
file
dateRangeValidator.js 2KB
file
dateValidator.js 1KB
file
now.js 1KB
file
throwIfConfigHasUnexpectedKeys.js 476B
folder
numeric 文件夹
file
numericValidator.js 1KB
file
integerValidator.js 1KB
file
numericRangeValidator.js 2KB
file
regularExpressionValidator.js 1KB
file
applySubValidations.js 313B
file
subValidationsCreator.js 571B
folder
string 文件夹
file
stringLengthValidator.js 2KB
file
stringValidator.js 1KB
file
populatedValidator.js 568B
file
arrayValidator.js 441B
file
RulesError.js 169B
file
namespace.js 116B
file
rules.js 1KB
file
mustBe.js 203B
file
applyPropertyRule.js 1KB
file
ensure.js 292B
folder
fluentInterface 文件夹
file
valueFirstFluentInterface.js 2KB
file
validationFluentInterface.js 2KB
file
ensureFluentInterface.js 2KB
file
applyRules.js 791B
file
isNumeric.js 95B
file
hasValue.js 153B
file
failureType.js 394B
folder
spec 文件夹
folder
validators 文件夹
folder
date 文件夹
folder
range 文件夹
file
handles.js 651B
file
failingToCreate.js 3KB
file
pass.js 2KB
file
fail.js 2KB
file
now.js 1KB
file
pass.js 1KB
file
fail.js 2KB
file
faiingToCreate.js 510B
folder
numericValidator 文件夹
folder
integer 文件夹
file
pass.js 1KB
file
fail.js 1KB
file
failingToCreate.js 475B
file
pass.js 1KB
folder
numericRangeValidator 文件夹
file
failingToCreate.js 2KB
file
pass.js 1KB
file
fail.js 1KB
file
fail.js 1KB
folder
array 文件夹
file
pass.js 804B
file
fail.js 1KB
folder
regex 文件夹
file
failingToCreate.js 2KB
file
pass.js 2KB
file
fail.js 1KB
file
testUtil.js 2KB
folder
populatedValidator 文件夹
file
pass.js 908B
file
fail.js 984B
folder
string 文件夹
file
pass.js 1KB
file
fail.js 2KB
folder
length 文件夹
file
failingToCreate.js 2KB
file
pass.js 810B
file
fail.js 1KB
file
testFixture.js 186B
folder
fluentInterface 文件夹
file
applyingWithFunctions.js 1KB
file
ensure.js 4KB
file
testUtil.js 5KB
file
applyingDeclarative.js 1KB
file
invoke_mocha.js 809B
folder
rules 文件夹
file
applyingNoRules.js 1KB
file
applyToNonObject.js 2KB
file
applyRules_hierarchy.js 3KB
file
applyRules_simple.js 2KB
file
mustBe.js 595B
folder
examples 文件夹
file
address.js.map 1KB
file
address.coffee 816B
file
person.js 906B
file
address.js 1KB
file
.travis.yml 87B
file
invoke_mocha.js 842B
file
rules.sln 957B
file
README.md 4KB
file
.gitignore 135B
file
index.js 226B
file
package.json 780B
...
zip 文件大小:50.17KB