2852138c3a
* allow sending directly to a channel or content address
16 lines
426 B
JavaScript
16 lines
426 B
JavaScript
// @flow
|
|
import { regexAddress } from 'lbry-redux';
|
|
|
|
export default function validateSendTx(address: string) {
|
|
const errors = {
|
|
address: '',
|
|
};
|
|
|
|
// All we need to check is if the address is valid
|
|
// If values are missing, users wont' be able to submit the form
|
|
if (!process.env.NO_ADDRESS_VALIDATION && !regexAddress.test(address)) {
|
|
errors.address = __('Not a valid LBRY address');
|
|
}
|
|
|
|
return errors;
|
|
};
|