Modify validate num and realnum to accept ints or floats too 

@ticoann
Please review and commit the PR. This is needed to handle input data inside body when make POST or PUT call.