Merge pull request #7192 from FreeCodeCamp/greenkeeper-validator-5.0.0

Update validator to version 5.0.0 🚀
This commit is contained in:
Logan Tegman
2016-02-25 11:21:21 -08:00
2 changed files with 7 additions and 7 deletions

View File

@@ -61,15 +61,15 @@ const checkboxClass = dedent`
`;
function formatValue(value, validator, type = 'string') {
const formated = getDefaults(type);
if (validator && type === 'string') {
formated.valid = validator(value);
const formatted = getDefaults(type);
if (validator && type === 'string' && typeof value === 'string') {
formatted.valid = validator(value);
}
if (value) {
formated.value = value;
formated.bsStyle = formated.valid ? 'success' : 'error';
formatted.value = value;
formatted.bsStyle = formatted.valid ? 'success' : 'error';
}
return formated;
return formatted;
}
const normalizeOptions = {

View File

@@ -119,7 +119,7 @@
"thundercats": "^3.1.0",
"thundercats-react": "~0.5.1",
"url-regex": "^3.0.0",
"validator": "^4.2.1",
"validator": "^5.0.0",
"webpack": "^1.9.12",
"webpack-stream": "^3.1.0",
"xss-filters": "^1.2.6",