@humandialog/forms.svelte 0.4.33 → 0.4.34
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/package.json +1 -1
- package/tenant.members.svelte +22 -2
package/package.json
CHANGED
package/tenant.members.svelte
CHANGED
|
@@ -265,8 +265,28 @@
|
|
|
265
265
|
|
|
266
266
|
function is_valid_email_address(e)
|
|
267
267
|
{
|
|
268
|
-
let pattern = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
|
|
269
|
-
return (e.match(pattern) != null);
|
|
268
|
+
//let pattern = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
|
|
269
|
+
//return (e.match(pattern) != null);
|
|
270
|
+
|
|
271
|
+
var at_idx = e.indexOf("@");
|
|
272
|
+
var dot_idx = e.lastIndexOf(".");
|
|
273
|
+
var space_idx = e.indexOf(" ");
|
|
274
|
+
|
|
275
|
+
if ((at_idx != -1) &&
|
|
276
|
+
(at_idx != 0) &&
|
|
277
|
+
(dot_idx != -1) &&
|
|
278
|
+
(dot_idx != 0) &&
|
|
279
|
+
(dot_idx > at_idx + 1) &&
|
|
280
|
+
(e.length > dot_idx + 1) &&
|
|
281
|
+
(space_idx == -1))
|
|
282
|
+
{
|
|
283
|
+
return true;
|
|
284
|
+
}
|
|
285
|
+
else
|
|
286
|
+
{
|
|
287
|
+
return false;
|
|
288
|
+
}
|
|
289
|
+
|
|
270
290
|
}
|
|
271
291
|
|
|
272
292
|
function is_valid_name(s)
|