Jaymon / endpoints

Lightweight REST api backend framework that automatically maps urls to python modules and classes
MIT License
29 stars 10 forks source link

param matches kwarg #5

Closed Jaymon closed 10 years ago

Jaymon commented 10 years ago

the matches keyword should compare the value against a regex

@param("email", matches="\S+@\S+")

if it is a tuple, then you would just pass everything to regex:

@param("email", matches=("\S+@\S+", re.I))

though I'm not in love with that, maybe it should always be either a regex string or an already compiled regex, that would be better and make more sense.

Jaymon commented 10 years ago

added in endpoints >=0.8.39