mybase 1.0.37 → 1.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mybase.js +3 -1
- package/package.json +1 -1
package/mybase.js
CHANGED
|
@@ -23,7 +23,9 @@ function validHPassword(hpassword) { return (hpassword && hpassword.length === 1
|
|
|
23
23
|
function validEmail_old(email) { return (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email)) }
|
|
24
24
|
|
|
25
25
|
function validEmail(email) {
|
|
26
|
-
|
|
26
|
+
if (typeof email==='string')
|
|
27
|
+
return validator.isEmail(email) // validator needs a string
|
|
28
|
+
return false
|
|
27
29
|
// giving up old style, was not reliable
|
|
28
30
|
// taken from https://www.w3resource.com/javascript/form/email-validation.php
|
|
29
31
|
// strange looking emails might be indeed valid
|