I am doing site, which will help people to collect their water meters readings. At the moment I am doing input form for adding current month readings.
Browser is checking data when user input it, not on/after form sending (via jquery). For example, user inputted 123 and pressed d after. After he pressed d error will appear near input field etc... So field is validating on keyup action
I am thinking about adding test, that will be passed if user inputted value, that is not lesser then previous month (or not previous month, just last inputted) value.
So imagine: Last month meter value was 250. Current 255. Input field is blank. User staring print. He pressing 2 (inputted value is 2 now). Remember that value is being tested on key up? jQuery will start test and will return error because 2 (current value in field) < 250 (last month meter value). After that he pressing 5 (inputted value is 25 now). 25 < 250, so jquery will still show error, that value, user inputting is invalid. After that he printing 5 again (now value inputted is 255). 255 not < then 250, so error message/block will disappear.
So the question is such: is it correct to show error on keyup for this test (checking if inputted value is less then last month value)? I think it is not rly correct, because some users are very newb to pc's and this message can scare them or idk :)))
Is it okay or should I find a way to test this only on onblur action (remove focus from field)? But will it be too late to show error message (I mean usability ofc)? I am checking inputs when ppl input their data because of better usability (so ppl know about his mistake on input stage, not after sending form).
Maybe there are another suggestion?