I have a form with an input field and I want to know if the user really filled that fileld, with a keystroke. I want to not allow the form being sent if the user used javascript to set the value of the field.
I know I can listen to keydown, keyup and keypress events in the input field to make sure the user indeed filled the input BUT it's very easy to the user to trigger those events with javascript like:
$('#my_input').focus();
$('#my_input').val("xxxx");
$('#my_input').keydown();
$('#my_input').keypress();
$('#my_input').keyup();
$('#my_input').blur();
If the user uses this javascript above he could fill the input and "simulate" he really did that. So how can I check if the user really filled the input, whether typing the content or pasting?
THIS IS A DIFFERENT QUESTION. NOT even close to a duplicated.