hey
use:
str.isdigit()
http://www.tutorialspoint.com/python/string_isdigit.htm
what is idDigit() ? is that a call to a method somewhere else.
and arent you trying to validate numberofapples = request.POST['numberofapples']
not playerid?
Personally if this is form data you are trying to validate
Hi django experts,
just want to know your opinion on how to validate the user input
(example: the user input field should be integer, but the user
accidentally inputs any character), here is my code:
FYI; the numberofapples field is IntegerField
here is my sample code:
def apples_edit(request):
2 matches
Mail list logo