javascript - Which is the best approch for numerical input in a textbox? -
i have textbox user enters id. id stored integer.
so, question is, should validate textbox after user enters value , clicks "search" button or should user allowed enter numbers?
i have solution both in javascript/jquery. not sure in terms of performance.
from functionality pov, should validate user may input numbers in numeric field, there data consistency. also, in experience, users when validate input right when they're typing it.
from safety pov, should server validate guarantee data consistency in database.
in conclusion should validate both ways. shouldn't excessively resource consuming forced choose 1 option only.
Comments
Post a Comment