storj/web/satellite/src/utils/validation.ts

14 lines
373 B
TypeScript
Raw Normal View History

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