export default function isValid(error) {

}

export default function isValid(error) {
  if ( !Array.isArray(error) ) {
    return !error;
  }
  return error.reduce(( valid, errorValue ) => valid && !errorValue, true);
}

Add functionality to allow for arrays of error values
Add functionality to allow for arrays of error values
