0.1.1 • Published 10 years ago

roentgen v0.1.1

Weekly downloads
45
License
-
Repository
-
Last release
10 years ago

roentgen

var validator = roentgen({
    type: 'array',
    item: {
        type: 'object',
        properties: {
            when: {
                type: 'timestamp',
                toDate: true
            },
            title: {
                type: 'string',
                length: [0, 10]
            },
            howMuch: {
                type: 'number'
            }
        }
    },
    length: [1, 10] 
});

var validation = validator.run([{when: 1389534416156, title: 'something', howMuch: 10}]);

if (validation.error) {
    console.info('validation failed', validation);
}
else {
    console.info('validation successed', validation);
}
0.1.1

10 years ago

0.1.0

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago