How to use the isISO8601 function from validator
Find comprehensive JavaScript validator.isISO8601 code examples handpicked from public code repositorys.
1004 1005 1006 1007 1008 1009 1010 1011 1012
data[f] = JSON.stringify(v); } else if (toolkit.endsWith(f, 'Time') // 时间类字段 && 'string' === typeof v && validator.isISO8601(v, { strict: true, strictSeparator: true })) { data[f] = new Date(v); } }
34
185
0
+ 2 other calls in file
15 16 17 18 19 20 21 22 23 24
return (value === 'true' || value === true || value === '1' || value === 1); }; // Add isDate method to Validator object V.isDate = function (value) { return (V.isRFC3339(value) || V.isISO8601(value)); }; // Add toIntFix method to Validator object to handle numeric output V.toIntFix = function (value) {
10
11
2
+ 10 other calls in file
GitHub: 1EdTech/caliper-js
202 203 204 205 206 207 208 209 210 211
* Check if date string is ISO 8601 compliant. * @param str * @returns {*} */ var isISO8601 = module.exports.isISO8601 = function isISO8601(str) { return validator.isISO8601(str); }; /** * Check if string is a blank node.
2
6
21
GitHub: xpepermint/approvedjs
2 3 4 5 6 7 8 9 10 11
function isFormat(str, format) { if (!format) return true; switch(format) { case 'iso8601': return isISO8601(str); default: return false; } }
0
4
2
1 2 3 4 5 6 7 8 9 10
var t = require('tcomb'); var _require = require('validator'), isUUID = _require.isUUID, isISO8601 = _require.isISO8601; var PercentClass = t.enums.of(['success', 'warning', 'danger'], 'PercentClass'); var TestState = t.enums.of(['passed', 'failed'], 'TestState'); var TestSpeed = t.enums.of(['slow', 'medium', 'fast'], 'TestSpeed');
84
0
12
-1
exports.isISO8601 = value => validator.isISO8601(value.toISOString());
0
0
5
validator.escape is the most popular function in validator (548 examples)