import isURL from 'validator/lib/isURL';

export default (value, [domain]) => isURL(value, { host_whitelist: domain ? [domain] : undefined });

import isURL from 'validator/lib/isURL';

export default (value, [domain] = [undefined]) =>
    isURL(value, { host_whitelist: domain ? [domain] : undefined });

fix failing test