lbry-desktop/ui/util/form-validation.js
zeppi ee9f63a161 integrate all the things
bugfix

wip

flow

fix

cleaning

clean
2021-10-15 23:49:41 -04:00

17 lines
427 B
JavaScript

// @flow
import { regexAddress } from 'util/lbryURI';
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;
}