icanhasfay / PyPwned

A Python client for the HaveIBeenPwned REST API
MIT License
45 stars 12 forks source link

regex to check emails can be added #1

Closed ninjatrench closed 9 years ago

ninjatrench commented 9 years ago

Simple regex check to verify the email address before making http request to api.

example code inside function getAllBreachesForAccount on line number 18 :---

import re pattern = re.compile(r"[^@]+@[^@]+.[^@]+") if not pattern.match(email): return fourHundredString

icanhasfay commented 9 years ago

Sorry about taking so long to add that, slipped my mind :( The referenced commit should do the trick.