@accounts/common
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -17,3 +17,3 @@ 'use strict'; | ||
var validateEmail = exports.validateEmail = function validateEmail(email) { | ||
var isValid = !(0, _lodash.isEmpty)((0, _lodash.trim)(email || '')); | ||
var isValid = !(0, _lodash.isEmpty)((0, _lodash.trim)(email || '')) && isEmail(email); | ||
return isValid; | ||
@@ -28,4 +28,5 @@ }; | ||
var validateUsername = exports.validateUsername = function validateUsername(username) { | ||
var isValid = !(0, _lodash.isEmpty)((0, _lodash.trim)(username || '')); | ||
var usernameRegex = /^[a-zA-Z][a-zA-Z0-9]*$/; | ||
var isValid = username && !(0, _lodash.isEmpty)((0, _lodash.trim)(username)) && usernameRegex.test(username); | ||
return isValid; | ||
}; |
{ | ||
"name": "@accounts/common", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Fullstack authentication and accounts-management", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
114957
2542
0