validation in textbox

only allow numerical values to be entered and limit of 500