on master help sign in
fix: 'v is undefined' and 'cannot read .length of undefined' errors when validating empty inputs
d955c27Matt Condon (shrugs)
src/lib/validators.js+1−1
@@ -23,7 +23,7 @@ export const validateMnemonic = v =>
23
23
24// Checks an empty field
24// Checks an empty field
25export const validateNotEmpty = v =>
25export const validateNotEmpty = v =>
26− v.length === 0 && 'This field is required.';
26+ (v === undefined || v.length === 0) && 'This field is required.';
27
27
28// Checks if a patp is a valid galaxy
28// Checks if a patp is a valid galaxy
29export const validateGalaxy = v => {
29export const validateGalaxy = v => {