Valley filter and valve effect by strong electrostatic potentials in graphene