storj/web/satellite/src/utils/validation.ts
2019-09-09 13:33:39 +03:00

13 lines
330 B
TypeScript

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
export function validateEmail(email: string): boolean {
const rgx = /.*@.*\..*$/;
return rgx.test(email);
}
export function validatePassword(password: string): boolean {
return typeof password !== 'undefined' && password.length >= 6;
}