@sergiomarques/sword-validation
Version:
Field validation tooling and defaults for SWORD Health Web Clients
51 lines (40 loc) • 1.18 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.anotherLeng = exports.maxLeng = void 0;
var _validators = require("vuelidate/lib/validators");
var addParam = function addParam(attributes, callback) {
return _validators.helpers.withParams(attributes, callback);
};
var maxLeng = function maxLeng(max) {
var attributes = {
type: 'maxLength',
max: max
};
var doThis = function doThis(value) {
console.log(value);
console.log((0, _validators.maxLength)(max));
return (0, _validators.maxLength)(max);
};
return addParam(attributes, doThis);
};
exports.maxLeng = maxLeng;
var anotherLeng = function anotherLeng(max) {
var attributes = {
type: 'maxLength',
max: max
};
var doThis = function doThis(value) {
console.log(value);
console.log((0, _validators.maxLength)(max));
return (0, _validators.maxLength)(max);
};
return _validators.helpers.withParams(attributes, function (value) {
console.log(value);
console.log(max);
console.log((0, _validators.maxLength)(max)());
return (0, _validators.maxLength)(max)();
});
};
exports.anotherLeng = anotherLeng;