make the viewer work at meteor 1.3
This commit is contained in:
1 parent
b3e5838caf
commit
b957b1f540
8 files changed
+1139
-2
No files matched your search
Executable
+1086
File diff suppressed because it is too large.
Load diff
Executable
+27
@@ -0,0 +1,27 @@
|
||||
import {validate as v} from './lib/validate.js';
|
||||
|
||||
v.validators.equals = function(value, options, key, attributes) {
|
||||
if (options && value !== options.value) {
|
||||
return key + 'must equal ' + options.value;
|
||||
}
|
||||
};
|
||||
|
||||
v.validators.doesNotEqual = function(value, options, key) {
|
||||
if (options && value === options.value) {
|
||||
return key + 'cannot equal ' + options.value;
|
||||
}
|
||||
};
|
||||
|
||||
v.validators.contains = function(value, options, key) {
|
||||
if (options && value.indexOf && value.indexOf(options.value) === -1) {
|
||||
return key + 'must contain ' + options.value;
|
||||
}
|
||||
};
|
||||
|
||||
v.validators.doesNotContain = function(value, options, key) {
|
||||
if (options && value.indexOf && value.indexOf(options.value) !== -1) {
|
||||
return key + 'cannot contain ' + options.value;
|
||||
}
|
||||
};
|
||||
|
||||
validate = v;
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
Package.describe({
|
||||
name: 'validatejs',
|
||||
summary: 'OHIF Validatejs temporary',
|
||||
version: '0.0.1'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.3.2.4');
|
||||
api.use('ecmascript');
|
||||
|
||||
api.addFiles('lib/validate.js', 'client');
|
||||
api.addFiles('load.js', 'client');
|
||||
|
||||
api.export('validate', 'client');
|
||||
});
|
||||
Reference in new issue
Block a user