2019-01-24 20:15:10 +00:00
|
|
|
// Copyright (C) 2019 Storj Labs, Inc.
|
2018-11-27 10:51:33 +00:00
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
2019-11-25 12:59:41 +00:00
|
|
|
// TODO: move functions to Validator class
|
2018-12-27 12:05:38 +00:00
|
|
|
export function validateEmail(email: string): boolean {
|
2018-12-26 15:05:33 +00:00
|
|
|
const rgx = /.*@.*\..*$/;
|
2018-11-05 15:26:18 +00:00
|
|
|
|
2018-12-26 15:05:33 +00:00
|
|
|
return rgx.test(email);
|
2018-12-18 14:43:23 +00:00
|
|
|
}
|
2018-12-27 12:05:38 +00:00
|
|
|
|
|
|
|
export function validatePassword(password: string): boolean {
|
2019-09-09 11:33:39 +01:00
|
|
|
return typeof password !== 'undefined' && password.length >= 6;
|
2018-12-27 12:05:38 +00:00
|
|
|
}
|