Quantcast
Channel: MarsHut
Viewing all articles
Browse latest Browse all 6551

All purpose type checking

$
0
0
I have a search form that lets a user pick the field to be searched from a
pop-up. They could enter a date, a string or a number. Sometimes they enter
all of the above and I'm only expecting one of the above.

GET:<QueryDict: {u'searchFieldselect': [u'RegNumber'], u'searchValue':
[u'Today260713'], u'season': [u'current_season']}>,

I'm not catching type errors very gracefully and I'm wondering if there's a
general approach to such things, or if I need to hard code the each test.

Viewing all articles
Browse latest Browse all 6551

Trending Articles